jQuery(document).ready(function ($){ "use strict"; function NectarSocial(){ this.$body=$('body'); this.$window=$(window); this.$wpAdminBar=$('#wpadminbar'); this.usingMobileBrowser=(navigator.userAgent.match(/(Android|iPod|iPhone|iPad|BlackBerry|IEMobile|Opera Mini)/)) ? true:false; this.mouseEvents(); this.nectarLove(); if($('body').find('.nectar-social.fixed')){ this.fixedStyle(); }} NectarSocial.prototype.mouseEvents=function(){ this.$body.on('click', '#single-below-header .nectar-social a', function (){ return false; }); $('body.single-product .nectar-social').addClass('woo'); this.$body.on('click', '.facebook-share:not(.inactive)', this.facebookShare); this.$body.on('click', '.nectar-social:not(".woo") .twitter-share:not(.inactive)', this.twitterShare); this.$body.on('click', '.nectar-social.woo .twitter-share', this.wooTwitterShare); this.$body.on('click', '.nectar-social:not(".woo") .linkedin-share:not(.inactive)', this.linkedInShare); this.$body.on('click', '.nectar-social.woo .linkedin-share', this.woolinkedInShare); this.$body.on('click', '.nectar-social:not(".woo") .pinterest-share:not(.inactive)', this.pinterestShare); this.$body.on('click', '.nectar-social.woo .pinterest-share', this.wooPinterestShare); this.$body.on('click', '.nectar-social.fixed > a', function (){ return false; }); if(!this.usingMobileBrowser){ var $socialTimeout; this.$body.on('mouseenter', '.nectar-social.hover .share-btn', function (){ clearTimeout($socialTimeout); if($(this).parents('[id*="-meta"]').length > 0){ $(this).parents('[id*="-meta"]').addClass('social-hovered'); } if($(this).parents('#single-below-header').length > 0){ $(this).parents('#single-below-header').addClass('social-hovered'); } $(this).parent().addClass('visible'); }); this.$body.on('mouseleave', '.nectar-social.hover', function (){ var $that=$(this); $socialTimeout=setTimeout(function (){ $that.removeClass('visible'); if($that.parents('[id*="-meta"]').length > 0){ $that.parents('[id*="-meta"]').removeClass('social-hovered'); } if($that.parents('#single-below-header').length > 0){ $that.parents('#single-below-header').removeClass('social-hovered'); }}, 200); }); }else{ this.$body.on('click', '.nectar-social.hover .share-btn', function (){ if($(this).parents('[id*="-meta"]').length > 0){ $(this).parents('[id*="-meta"]').addClass('social-hovered'); } if($(this).parents('#single-below-header').length > 0){ $(this).parents('#single-below-header').addClass('social-hovered'); } $(this).parent().addClass('visible'); return false; }); }}; NectarSocial.prototype.facebookShare=function(){ var windowLocation=window.location.href.replace(window.location.hash, ''); window.open('https://www.facebook.com/sharer/sharer.php?u=' + windowLocation, "facebookWindow", "height=380,width=660,resizable=0,toolbar=0,menubar=0,status=0,location=0,scrollbars=0"); return false; }; NectarSocial.prototype.facebookShare=function(){ var windowLocation=window.location.href.replace(window.location.hash, ''); window.open('https://www.facebook.com/sharer/sharer.php?u=' + windowLocation, "facebookWindow", "height=380,width=660,resizable=0,toolbar=0,menubar=0,status=0,location=0,scrollbars=0"); return false; }; NectarSocial.prototype.twitterShare=function(){ var windowLocation=window.location.href.replace(window.location.hash, ''); var $pageTitle; if($(".section-title h1").length > 0){ $pageTitle=encodeURIComponent($(".section-title h1").text()); }else{ $pageTitle=encodeURIComponent($(document).find("title").text()); } window.open('http://twitter.com/intent/tweet?text=' + $pageTitle + ' ' + windowLocation, "twitterWindow", "height=380,width=660,resizable=0,toolbar=0,menubar=0,status=0,location=0,scrollbars=0"); return false; }; NectarSocial.prototype.wooTwitterShare=function(){ var windowLocation=window.location.href.replace(window.location.hash, ''); window.open('http://twitter.com/intent/tweet?text=' + $("h1.product_title").text() + ' ' + windowLocation, "twitterWindow", "height=380,width=660,resizable=0,toolbar=0,menubar=0,status=0,location=0,scrollbars=0"); return false; }; NectarSocial.prototype.linkedInShare=function(){ var windowLocation=window.location.href.replace(window.location.hash, ''); var $pageTitle; if($(".section-title h1").length > 0){ $pageTitle=encodeURIComponent($(".section-title h1").text()); }else{ $pageTitle=encodeURIComponent($(document).find("title").text()); } window.open('http://www.linkedin.com/shareArticle?mini=true&url=' + windowLocation + '&title=' + $pageTitle + '', "linkedInWindow", "height=480,width=660,resizable=0,toolbar=0,menubar=0,status=0,location=0,scrollbars=0"); return false; }; NectarSocial.prototype.woolinkedInShare=function(){ var windowLocation=window.location.href.replace(window.location.hash, ''); window.open('http://www.linkedin.com/shareArticle?mini=true&url=' + windowLocation + '&title=' + $("h1.product_title").text(), "twitterWindow", "height=380,width=660,resizable=0,toolbar=0,menubar=0,status=0,location=0,scrollbars=0"); return false; }; NectarSocial.prototype.pinterestShare=function(){ var windowLocation=window.location.href.replace(window.location.hash, ''); var $sharingImg=($('.single-portfolio').length > 0&&$('div[data-featured-img]').attr('data-featured-img')!='empty') ? $('div[data-featured-img]').attr('data-featured-img'):$('#ajax-content-wrap img').first().attr('src'); var $pageTitle; if($(".section-title h1").length > 0){ $pageTitle=encodeURIComponent($(".section-title h1").text()); }else{ $pageTitle=encodeURIComponent($(document).find("title").text()); } window.open('http://pinterest.com/pin/create/button/?url=' + windowLocation + '&media=' + $sharingImg + '&description=' + $pageTitle, "pinterestWindow", "height=640,width=660,resizable=0,toolbar=0,menubar=0,status=0,location=0,scrollbars=0"); return false; }; NectarSocial.prototype.wooPinterestShare=function (){ var $imgToShare=($('img.attachment-shop_single').length > 0) ? $('img.attachment-shop_single').first().attr('src'):$('.single-product-main-image img').first().attr('src'); var windowLocation=window.location.href.replace(window.location.hash, ''); window.open('http://pinterest.com/pin/create/button/?url=' + windowLocation + '&media=' + $imgToShare + '&description=' + $('h1.product_title').text(), "pinterestWindow", "height=640,width=660,resizable=0,toolbar=0,menubar=0,status=0,location=0,scrollbars=0"); return false; }; NectarSocial.prototype.nectarLove=function(){ this.$body.on('click', '.nectar-love', function (){ var $loveLink=$(this), $id=$(this).attr('id'), $that=$(this); if($loveLink.hasClass('loved')||$(this).hasClass('inactive')){ return false; } var $dataToPass={ action: 'nectar-love', loves_id: $id, love_nonce: window.nectarLove.loveNonce }; $.post(window.nectarLove.ajaxurl, $dataToPass, function (data){ $loveLink.find('.nectar-love-count').html(data); $loveLink.addClass('loved').attr('title', 'You already love this!'); $that.find('.icon-salient-heart-2').addClass('loved'); }); $(this).addClass('inactive'); return false; }); }; NectarSocial.prototype.fixedStyle=function(){ $('.wpb_wrapper .nectar-social.fixed').each(function(i){ if(i!==0){ $(this).remove(); }else{ var $fixedMarkup=$(this).clone(); $('body').append($fixedMarkup); $(this).remove(); }}); function showFixedSharing(){ if($(window).scrollTop() > 150){ $('.nectar-social.fixed').addClass('visible'); $(window).off('scroll', showFixedSharing); $(window).on('scroll', hideFixedSharing); }} function hideFixedSharing(){ if($(window).scrollTop() < 150){ $('.nectar-social.fixed').removeClass('visible'); $(window).off('scroll', hideFixedSharing); $(window).on('scroll', showFixedSharing); }} if($(window).width() < 1000&&$('.nectar-social.fixed').length > 0){ if($(window).scrollTop() > 150){ $(window).on('scroll', hideFixedSharing); }else{ $(window).on('scroll', showFixedSharing); }} $(window).on('smartresize',function (){ if($(window).width() > 1000){ $('.nectar-social.fixed').addClass('visible'); }else if($(window).scrollTop() < 150){ $(window).off('scroll', hideFixedSharing); $(window).on('scroll', showFixedSharing); $('.nectar-social.fixed').removeClass('visible'); }else{ $(window).off('scroll', showFixedSharing); $(window).on('scroll', hideFixedSharing); }}); }; var nectarSocialInit=new NectarSocial(); window.NectarSocial=NectarSocial; }); !function(e){var n=!1;if("function"==typeof define&&define.amd&&(define(e),n=!0),"object"==typeof exports&&(module.exports=e(),n=!0),!n){var o=window.Cookies,t=window.Cookies=e();t.noConflict=function(){return window.Cookies=o,t}}}(function(){function e(){for(var e=0,n={};e1){if("number"==typeof(i=e({path:"/"},t.defaults,i)).expires){var a=new Date;a.setMilliseconds(a.getMilliseconds()+864e5*i.expires),i.expires=a}i.expires=i.expires?i.expires.toUTCString():"";try{c=JSON.stringify(r),/^[\{\[]/.test(c)&&(r=c)}catch(m){}r=o.write?o.write(r,n):encodeURIComponent(String(r)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),n=(n=(n=encodeURIComponent(String(n))).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape);var f="";for(var s in i)i[s]&&(f+="; "+s,!0!==i[s]&&(f+="="+i[s]));return document.cookie=n+"="+r+f}n||(c={});for(var p=document.cookie?document.cookie.split("; "):[],d=/(%[0-9A-Z]{2})+/g,u=0;u'),t(".woocommerce form input").filter(":password").parent("span").addClass("password-input"),t(".password-input").append(''),t(".show-password-input").click(function(){t(this).toggleClass("display-password"),t(this).hasClass("display-password")?t(this).siblings(['input[type="password"]']).prop("type","text"):t(this).siblings('input[type="text"]').prop("type","password")})}); jQuery(function(r){if("undefined"==typeof wc_cart_fragments_params)return!1;var t=!0,o=wc_cart_fragments_params.cart_hash_key;try{t="sessionStorage"in window&&null!==window.sessionStorage,window.sessionStorage.setItem("wc","test"),window.sessionStorage.removeItem("wc"),window.localStorage.setItem("wc","test"),window.localStorage.removeItem("wc")}catch(f){t=!1}function a(){t&&sessionStorage.setItem("wc_cart_created",(new Date).getTime())}function s(e){t&&(localStorage.setItem(o,e),sessionStorage.setItem(o,e))}var e={url:wc_cart_fragments_params.wc_ajax_url.toString().replace("%%endpoint%%","get_refreshed_fragments"),type:"POST",data:{time:(new Date).getTime()},timeout:wc_cart_fragments_params.request_timeout,success:function(e){e&&e.fragments&&(r.each(e.fragments,function(e,t){r(e).replaceWith(t)}),t&&(sessionStorage.setItem(wc_cart_fragments_params.fragment_name,JSON.stringify(e.fragments)),s(e.cart_hash),e.cart_hash&&a()),r(document.body).trigger("wc_fragments_refreshed"))},error:function(){r(document.body).trigger("wc_fragments_ajax_error")}};function n(){r.ajax(e)}if(t){var i=null;r(document.body).on("wc_fragment_refresh updated_wc_div",function(){n()}),r(document.body).on("added_to_cart removed_from_cart",function(e,t,r){var n=sessionStorage.getItem(o);null!==n&&n!==undefined&&""!==n||a(),sessionStorage.setItem(wc_cart_fragments_params.fragment_name,JSON.stringify(t)),s(r)}),r(document.body).on("wc_fragments_refreshed",function(){clearTimeout(i),i=setTimeout(n,864e5)}),r(window).on("storage onstorage",function(e){o===e.originalEvent.key&&localStorage.getItem(o)!==sessionStorage.getItem(o)&&n()}),r(window).on("pageshow",function(e){e.originalEvent.persisted&&(r(".widget_shopping_cart_content").empty(),r(document.body).trigger("wc_fragment_refresh"))});try{var c=r.parseJSON(sessionStorage.getItem(wc_cart_fragments_params.fragment_name)),_=sessionStorage.getItem(o),g=Cookies.get("woocommerce_cart_hash"),m=sessionStorage.getItem("wc_cart_created");if(null!==_&&_!==undefined&&""!==_||(_=""),null!==g&&g!==undefined&&""!==g||(g=""),_&&(null===m||m===undefined||""===m))throw"No cart_created";if(m){var d=+m+864e5,w=(new Date).getTime();if(dn)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})}); var headerEl=document.getElementById('header-outer'); var headerSpaceEl=document.getElementById('header-space'); if(typeof(headerEl)!='undefined'&&headerEl!=null && typeof(headerSpaceEl)!='undefined'&&headerSpaceEl!=null && headerSpaceEl.hasAttribute('data-secondary-header-display')){ headerSpaceEl.style.height=headerEl.clientHeight + 'px'; } jQuery(function($){ "use strict"; var using_mobile_browser=false; if(navigator.userAgent.match(/(Android|iPod|iPhone|iPad|BlackBerry|IEMobile|Opera Mini)/)){ using_mobile_browser=true; } var nectarPageHeader; function fullscreenHeightCalc(){ var pageHeaderOffset=nectarPageHeader.offset().top; nectarPageHeader.css('height',(parseInt(window.innerHeight) - parseInt(pageHeaderOffset)) +'px'); } if(using_mobile_browser&&$('#page-header-bg.fullscreen-header').length > 0){ nectarPageHeader=$('#page-header-bg'); fullscreenHeightCalc(); var $windowDOMWidth=window.innerWidth, $windowDOMHeight=window.innerHeight; $(window).resize(function(){ if(($(window).width()!=$windowDOMWidth&&$(window).height!=$windowDOMHeight)){ fullscreenHeightCalc(); $windowDOMWidth=window.innerWidth; $windowDOMHeight=window.innerHeight; }}); } function portfolioFullScreenSliderCalcs(){ var $bodyBorderSize=($('.body-border-top').length > 0&&$(window).width() > 1000) ? $('.body-border-top').height(): 0; $('.nectar_fullscreen_zoom_recent_projects').each(function(){ if($(this).parents('.first-section').length > 0){ $(this).css('height',$(window).height() - $(this).offset().top - $bodyBorderSize); }else{ $(this).css('height',$(window).height()); }}); } if(using_mobile_browser&&$('.nectar_fullscreen_zoom_recent_projects').length > 0){ portfolioFullScreenSliderCalcs(); } function centeredNavBottomBarReposition(){ var $headerSpan9=$('#header-outer[data-format="centered-menu-bottom-bar"] header#top .span_9'); var $headerSpan3=$('#header-outer[data-format="centered-menu-bottom-bar"] header#top .span_3'); var $secondaryHeader=$('#header-secondary-outer'); var $logoLinkClone=$headerSpan3.find('#logo').clone(); if($logoLinkClone.is('[data-supplied-ml="true"]')){ $logoLinkClone.find('img:not(.mobile-only-logo)').remove(); } $logoLinkClone.find('img.starting-logo').remove(); if($secondaryHeader.length > 0){ $secondaryHeader.addClass('centered-menu-bottom-bar'); } if($('#header-outer[data-condense="true"]').length > 0){ $headerSpan9.prepend($logoLinkClone); }} if($('#header-outer[data-format="centered-menu-bottom-bar"]').length > 0){ centeredNavBottomBarReposition(); } $('#page-header-bg[data-animate-in-effect="zoom-out"]').addClass('loaded'); function sliderFontOverrides(){ var $overrideCSS=''; $('.nectar-slider-wrap').each(function(){ if($(this).find('.swiper-container[data-tho]').length > 0){ var $tho=$(this).find('.swiper-container').attr('data-tho'); var $tco=$(this).find('.swiper-container').attr('data-tco'); var $pho=$(this).find('.swiper-container').attr('data-pho'); var $pco=$(this).find('.swiper-container').attr('data-pco'); if($tho!='auto'||$tco!='auto'){ $overrideCSS +='@media only screen and (max-width: 1000px) and (min-width: 690px){'; if($tho!='auto') $overrideCSS +='#'+$(this).attr('id')+ '.nectar-slider-wrap[data-full-width="false"] .swiper-slide .content h2, #boxed .nectar-slider-wrap#'+$(this).attr('id')+ ' .swiper-slide .content h2, body .nectar-slider-wrap#'+$(this).attr('id')+ '[data-full-width="true"] .swiper-slide .content h2, body .nectar-slider-wrap#'+$(this).attr('id')+ '[data-full-width="boxed-full-width"] .swiper-slide .content h2, body .full-width-content .vc_span12 .nectar-slider-wrap#'+$(this).attr('id')+ ' .swiper-slide .content h2 { font-size:' + $tho + 'px!important; line-height:' + (parseInt($tho) + 10) + 'px!important; }'; if($pho!='auto') $overrideCSS +='#'+$(this).attr('id')+ '.nectar-slider-wrap[data-full-width="false"] .swiper-slide .content p, #boxed .nectar-slider-wrap#'+$(this).attr('id')+ ' .swiper-slide .content p, body .nectar-slider-wrap#'+$(this).attr('id')+ '[data-full-width="true"] .swiper-slide .content p, body .nectar-slider-wrap#'+$(this).attr('id')+ '[data-full-width="boxed-full-width"] .swiper-slide .content p, body .full-width-content .vc_span12 .nectar-slider-wrap#'+$(this).attr('id')+ ' .swiper-slide .content p { font-size:' + $tco + 'px!important; line-height:' + (parseInt($tco) + 10) + 'px!important; }'; $overrideCSS +='}'; } if($pho!='auto'||$pco!='auto'){ $overrideCSS +='@media only screen and (max-width: 690px){'; if($pho!='auto') $overrideCSS +='#'+$(this).attr('id')+ '.nectar-slider-wrap[data-full-width="false"] .swiper-slide .content h2, #boxed .nectar-slider-wrap#'+$(this).attr('id')+ ' .swiper-slide .content h2, body .nectar-slider-wrap#'+$(this).attr('id')+ '[data-full-width="true"] .swiper-slide .content h2, body .nectar-slider-wrap#'+$(this).attr('id')+ '[data-full-width="boxed-full-width"] .swiper-slide .content h2, body .full-width-content .vc_span12 .nectar-slider-wrap#'+$(this).attr('id')+ ' .swiper-slide .content h2 { font-size:' + $pho + 'px!important; line-height:' + (parseInt($pho) + 10) + 'px!important; }'; if($pho!='auto') $overrideCSS +='#'+$(this).attr('id')+ '.nectar-slider-wrap[data-full-width="false"] .swiper-slide .content p, #boxed .nectar-slider-wrap#'+$(this).attr('id')+ ' .swiper-slide .content p, body .nectar-slider-wrap#'+$(this).attr('id')+ '[data-full-width="true"] .swiper-slide .content p, body .nectar-slider-wrap#'+$(this).attr('id')+ '[data-full-width="boxed-full-width"] .swiper-slide .content p, body .full-width-content .vc_span12 .nectar-slider-wrap#'+$(this).attr('id')+ ' .swiper-slide .content p { font-size:' + $pco + 'px!important; line-height:' + (parseInt($pco) + 10) + 'px!important; }'; $overrideCSS +='}'; }} }); if($overrideCSS.length > 1){ var head=document.head||document.getElementsByTagName('head')[0]; var style=document.createElement('style'); style.type='text/css'; if(style.styleSheet){ style.styleSheet.cssText=$overrideCSS; }else{ style.appendChild(document.createTextNode($overrideCSS)); } head.appendChild(style); $('.nectar-slider-wrap .content').css('visibility','visible'); }} sliderFontOverrides(); }); (function(k){k.transit={version:"0.9.9",propertyMap:{marginLeft:"margin",marginRight:"margin",marginBottom:"margin",marginTop:"margin",paddingLeft:"padding",paddingRight:"padding",paddingBottom:"padding",paddingTop:"padding"},enabled:true,useTransitionEnd:false};var d=document.createElement("div");var q={};function b(v){if(v in d.style){return v}var u=["Moz","Webkit","O","ms"];var r=v.charAt(0).toUpperCase()+v.substr(1);if(v in d.style){return v}for(var t=0;t-1;q.transition=b("transition");q.transitionDelay=b("transitionDelay");q.transform=b("transform");q.transformOrigin=b("transformOrigin");q.transform3d=e();var i={transition:"transitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",WebkitTransition:"webkitTransitionEnd",msTransition:"MSTransitionEnd"};var f=q.transitionEnd=i[q.transition]||null;for(var p in q){if(q.hasOwnProperty(p)&&typeof k.support[p]==="undefined"){k.support[p]=q[p]}}d=null;k.cssEase={_default:"ease","in":"ease-in",out:"ease-out","in-out":"ease-in-out",snap:"cubic-bezier(0,1,.5,1)",easeOutCubic:"cubic-bezier(.215,.61,.355,1)",easeInOutCubic:"cubic-bezier(.645,.045,.355,1)",easeInCirc:"cubic-bezier(.6,.04,.98,.335)",easeOutCirc:"cubic-bezier(.075,.82,.165,1)",easeInOutCirc:"cubic-bezier(.785,.135,.15,.86)",easeInExpo:"cubic-bezier(.95,.05,.795,.035)",easeOutExpo:"cubic-bezier(.19,1,.22,1)",easeInOutExpo:"cubic-bezier(1,0,0,1)",easeInQuad:"cubic-bezier(.55,.085,.68,.53)",easeOutQuad:"cubic-bezier(.25,.46,.45,.94)",easeInOutQuad:"cubic-bezier(.455,.03,.515,.955)",easeInQuart:"cubic-bezier(.895,.03,.685,.22)",easeOutQuart:"cubic-bezier(.165,.84,.44,1)",easeInOutQuart:"cubic-bezier(.77,0,.175,1)",easeInQuint:"cubic-bezier(.755,.05,.855,.06)",easeOutQuint:"cubic-bezier(.23,1,.32,1)",easeInOutQuint:"cubic-bezier(.86,0,.07,1)",easeInSine:"cubic-bezier(.47,0,.745,.715)",easeOutSine:"cubic-bezier(.39,.575,.565,1)",easeInOutSine:"cubic-bezier(.445,.05,.55,.95)",easeInBack:"cubic-bezier(.6,-.28,.735,.045)",easeOutBack:"cubic-bezier(.175, .885,.32,1.275)",easeInOutBack:"cubic-bezier(.68,-.55,.265,1.55)"};k.cssHooks["transit:transform"]={get:function(r){return k(r).data("transform")||new j()},set:function(s,r){var t=r;if(!(t instanceof j)){t=new j(t)}if(q.transform==="WebkitTransform"&&!a){s.style[q.transform]=t.toString(true)}else{s.style[q.transform]=t.toString()}k(s).data("transform",t)}};k.cssHooks.transform={set:k.cssHooks["transit:transform"].set};if(k.fn.jquery<"1.8"){k.cssHooks.transformOrigin={get:function(r){return r.style[q.transformOrigin]},set:function(r,s){r.style[q.transformOrigin]=s}};k.cssHooks.transition={get:function(r){return r.style[q.transition]},set:function(r,s){r.style[q.transition]=s}}}n("scale");n("translate");n("rotate");n("rotateX");n("rotateY");n("rotate3d");n("perspective");n("skewX");n("skewY");n("x",true);n("y",true);function j(r){if(typeof r==="string"){this.parse(r)}return this}j.prototype={setFromString:function(t,s){var r=(typeof s==="string")?s.split(","):(s.constructor===Array)?s:[s];r.unshift(t);j.prototype.set.apply(this,r)},set:function(s){var r=Array.prototype.slice.apply(arguments,[1]);if(this.setter[s]){this.setter[s].apply(this,r)}else{this[s]=r.join(",")}},get:function(r){if(this.getter[r]){return this.getter[r].apply(this)}else{return this[r]||0}},setter:{rotate:function(r){this.rotate=o(r,"deg")},rotateX:function(r){this.rotateX=o(r,"deg")},rotateY:function(r){this.rotateY=o(r,"deg")},scale:function(r,s){if(s===undefined){s=r}this.scale=r+","+s},skewX:function(r){this.skewX=o(r,"deg")},skewY:function(r){this.skewY=o(r,"deg")},perspective:function(r){this.perspective=o(r,"px")},x:function(r){this.set("translate",r,null)},y:function(r){this.set("translate",null,r)},translate:function(r,s){if(this._translateX===undefined){this._translateX=0}if(this._translateY===undefined){this._translateY=0}if(r!==null&&r!==undefined){this._translateX=o(r,"px")}if(s!==null&&s!==undefined){this._translateY=o(s,"px")}this.translate=this._translateX+","+this._translateY}},getter:{x:function(){return this._translateX||0},y:function(){return this._translateY||0},scale:function(){var r=(this.scale||"1,1").split(",");if(r[0]){r[0]=parseFloat(r[0])}if(r[1]){r[1]=parseFloat(r[1])}return(r[0]===r[1])?r[0]:r},rotate3d:function(){var t=(this.rotate3d||"0,0,0,0deg").split(",");for(var r=0;r<=3;++r){if(t[r]){t[r]=parseFloat(t[r])}}if(t[3]){t[3]=o(t[3],"deg")}return t}},parse:function(s){var r=this;s.replace(/([a-zA-Z0-9]+)\((.*?)\)/g,function(t,v,u){r.setFromString(v,u)})},toString:function(t){var s=[];for(var r in this){if(this.hasOwnProperty(r)){if((!q.transform3d)&&((r==="rotateX")||(r==="rotateY")||(r==="perspective")||(r==="transformOrigin"))){continue}if(r[0]!=="_"){if(t&&(r==="scale")){s.push(r+"3d("+this[r]+",1)")}else{if(t&&(r==="translate")){s.push(r+"3d("+this[r]+",0)")}else{s.push(r+"("+this[r]+")")}}}}}return s.join(" ")}};function m(s,r,t){if(r===true){s.queue(t)}else{if(r){s.queue(r,t)}else{t()}}}function h(s){var r=[];k.each(s,function(t){t=k.camelCase(t);t=k.transit.propertyMap[t]||k.cssProps[t]||t;t=c(t);if(k.inArray(t,r)===-1){r.push(t)}});return r}function g(s,v,x,r){var t=h(s);if(k.cssEase[x]){x=k.cssEase[x]}var w=""+l(v)+" "+x;if(parseInt(r,10)>0){w+=" "+l(r)}var u=[];k.each(t,function(z,y){u.push(y+" "+w)});return u.join(", ")}k.fn.transition=k.fn.transit=function(z,s,y,C){var D=this;var u=0;var w=true;if(typeof s==="function"){C=s;s=undefined}if(typeof y==="function"){C=y;y=undefined}if(typeof z.easing!=="undefined"){y=z.easing;delete z.easing}if(typeof z.duration!=="undefined"){s=z.duration;delete z.duration}if(typeof z.complete!=="undefined"){C=z.complete;delete z.complete}if(typeof z.queue!=="undefined"){w=z.queue;delete z.queue}if(typeof z.delay!=="undefined"){u=z.delay;delete z.delay}if(typeof s==="undefined"){s=k.fx.speeds._default}if(typeof y==="undefined"){y=k.cssEase._default}s=l(s);var E=g(z,s,y,u);var B=k.transit.enabled&&q.transition;var t=B?(parseInt(s,10)+parseInt(u,10)):0;if(t===0){var A=function(F){D.css(z);if(C){C.apply(D)}if(F){F()}};m(D,w,A);return D}var x={};var r=function(H){var G=false;var F=function(){if(G){D.unbind(f,F)}if(t>0){D.each(function(){this.style[q.transition]=(x[this]||null)})}if(typeof C==="function"){C.apply(D)}if(typeof H==="function"){H()}};if((t>0)&&(f)&&(k.transit.useTransitionEnd)){G=true;D.bind(f,F)}else{window.setTimeout(F,t)}D.each(function(){if(t>0){this.style[q.transition]=E}k(this).css(z)})};var v=function(F){this.offsetWidth;r(F)};m(D,w,v);return this};function n(s,r){if(!r){k.cssNumber[s]=true}k.transit.propertyMap[s]=q.transform;k.cssHooks[s]={get:function(v){var u=k(v).css("transit:transform");return u.get(s)},set:function(v,w){var u=k(v).css("transit:transform");u.setFromString(s,w);k(v).css({"transit:transform":u})}}}function c(r){return r.replace(/([A-Z])/g,function(s){return"-"+s.toLowerCase()})}function o(s,r){if((typeof s==="string")&&(!s.match(/^[\-0-9\.]+$/))){return s}else{return""+s+r}}function l(s){var r=s;if(k.fx.speeds[r]){r=k.fx.speeds[r]}return o(r,"ms")}k.transit.getTransitionValue=g})(jQuery); (function(){ 'use strict' var keyCounter=0 var allWaypoints={} function Waypoint(options){ if(!options){ throw new Error('No options passed to Waypoint constructor') } if(!options.element){ throw new Error('No element option passed to Waypoint constructor') } if(!options.handler){ throw new Error('No handler option passed to Waypoint constructor') } this.key='waypoint-' + keyCounter this.options=Waypoint.Adapter.extend({}, Waypoint.defaults, options) this.element=this.options.element this.adapter=new Waypoint.Adapter(this.element) this.callback=options.handler this.axis=this.options.horizontal ? 'horizontal':'vertical' this.enabled=this.options.enabled this.triggerPoint=null this.group=Waypoint.Group.findOrCreate({ name: this.options.group, axis: this.axis }) this.context=Waypoint.Context.findOrCreateByElement(this.options.context) if(Waypoint.offsetAliases[this.options.offset]){ this.options.offset=Waypoint.offsetAliases[this.options.offset] } this.group.add(this) this.context.add(this) allWaypoints[this.key]=this keyCounter +=1 } Waypoint.prototype.queueTrigger=function(direction){ this.group.queueTrigger(this, direction) } Waypoint.prototype.trigger=function(args){ if(!this.enabled){ return } if(this.callback){ this.callback.apply(this, args) }} Waypoint.prototype.destroy=function(){ this.context.remove(this) this.group.remove(this) delete allWaypoints[this.key] } Waypoint.prototype.disable=function(){ this.enabled=false return this } Waypoint.prototype.enable=function(){ this.context.refresh() this.enabled=true return this } Waypoint.prototype.next=function(){ return this.group.next(this) } Waypoint.prototype.previous=function(){ return this.group.previous(this) } Waypoint.invokeAll=function(method){ var allWaypointsArray=[] for (var waypointKey in allWaypoints){ allWaypointsArray.push(allWaypoints[waypointKey]) } for (var i=0, end=allWaypointsArray.length; i < end; i++){ allWaypointsArray[i][method]() }} Waypoint.destroyAll=function(){ Waypoint.invokeAll('destroy') } Waypoint.disableAll=function(){ Waypoint.invokeAll('disable') } Waypoint.enableAll=function(){ Waypoint.Context.refreshAll() for (var waypointKey in allWaypoints){ allWaypoints[waypointKey].enabled=true } return this } Waypoint.refreshAll=function(){ Waypoint.Context.refreshAll() } Waypoint.viewportHeight=function(){ return window.innerHeight||document.documentElement.clientHeight } Waypoint.viewportWidth=function(){ return document.documentElement.clientWidth } Waypoint.adapters=[] Waypoint.defaults={ context: window, continuous: true, enabled: true, group: 'default', horizontal: false, offset: 0 } Waypoint.offsetAliases={ 'bottom-in-view': function(){ return this.context.innerHeight() - this.adapter.outerHeight() }, 'right-in-view': function(){ return this.context.innerWidth() - this.adapter.outerWidth() }} window.Waypoint=Waypoint }()) ;(function(){ 'use strict' function requestAnimationFrameShim(callback){ window.setTimeout(callback, 1000 / 60) } var keyCounter=0 var contexts={} var Waypoint=window.Waypoint var oldWindowLoad=window.onload function Context(element){ this.element=element this.Adapter=Waypoint.Adapter this.adapter=new this.Adapter(element) this.key='waypoint-context-' + keyCounter this.didScroll=false this.didResize=false this.oldScroll={ x: this.adapter.scrollLeft(), y: this.adapter.scrollTop() } this.waypoints={ vertical: {}, horizontal: {}} element.waypointContextKey=this.key contexts[element.waypointContextKey]=this keyCounter +=1 if(!Waypoint.windowContext){ Waypoint.windowContext=true Waypoint.windowContext=new Context(window) } this.createThrottledScrollHandler() this.createThrottledResizeHandler() } Context.prototype.add=function(waypoint){ var axis=waypoint.options.horizontal ? 'horizontal':'vertical' this.waypoints[axis][waypoint.key]=waypoint this.refresh() } Context.prototype.checkEmpty=function(){ var horizontalEmpty=this.Adapter.isEmptyObject(this.waypoints.horizontal) var verticalEmpty=this.Adapter.isEmptyObject(this.waypoints.vertical) var isWindow=this.element==this.element.window if(horizontalEmpty&&verticalEmpty&&!isWindow){ this.adapter.off('.waypoints') delete contexts[this.key] }} Context.prototype.createThrottledResizeHandler=function(){ var self=this function resizeHandler(){ self.handleResize() self.didResize=false } this.adapter.on('resize.waypoints', function(){ if(!self.didResize){ self.didResize=true Waypoint.requestAnimationFrame(resizeHandler) }}) } Context.prototype.createThrottledScrollHandler=function(){ var self=this function scrollHandler(){ self.handleScroll() self.didScroll=false } this.adapter.on('scroll.waypoints', function(){ if(!self.didScroll||Waypoint.isTouch){ self.didScroll=true Waypoint.requestAnimationFrame(scrollHandler) }}) } Context.prototype.handleResize=function(){ Waypoint.Context.refreshAll() } Context.prototype.handleScroll=function(){ var triggeredGroups={} var axes={ horizontal: { newScroll: 0, oldScroll: 0, forward: 'right', backward: 'left' }, vertical: { newScroll: this.adapter.scrollTop(), oldScroll: this.oldScroll.y, forward: 'down', backward: 'up' }} for (var axisKey in axes){ var axis=axes[axisKey] var isForward=axis.newScroll > axis.oldScroll var direction=isForward ? axis.forward:axis.backward for (var waypointKey in this.waypoints[axisKey]){ var waypoint=this.waypoints[axisKey][waypointKey] if(waypoint.triggerPoint===null){ continue } var wasBeforeTriggerPoint=axis.oldScroll < waypoint.triggerPoint var nowAfterTriggerPoint=axis.newScroll >=waypoint.triggerPoint var crossedForward=wasBeforeTriggerPoint&&nowAfterTriggerPoint var crossedBackward = !wasBeforeTriggerPoint&&!nowAfterTriggerPoint if(crossedForward||crossedBackward){ waypoint.queueTrigger(direction) triggeredGroups[waypoint.group.id]=waypoint.group }} } for (var groupKey in triggeredGroups){ triggeredGroups[groupKey].flushTriggers() } this.oldScroll={ x: axes.horizontal.newScroll, y: axes.vertical.newScroll }} Context.prototype.innerHeight=function(){ if(this.element==this.element.window){ return Waypoint.viewportHeight() } return this.adapter.innerHeight() } Context.prototype.remove=function(waypoint){ delete this.waypoints[waypoint.axis][waypoint.key] this.checkEmpty() } Context.prototype.innerWidth=function(){ if(this.element==this.element.window){ return Waypoint.viewportWidth() } return this.adapter.innerWidth() } Context.prototype.destroy=function(){ var allWaypoints=[] for (var axis in this.waypoints){ for (var waypointKey in this.waypoints[axis]){ allWaypoints.push(this.waypoints[axis][waypointKey]) }} for (var i=0, end=allWaypoints.length; i < end; i++){ allWaypoints[i].destroy() }} Context.prototype.refresh=function(){ var isWindow=this.element==this.element.window var contextOffset=isWindow ? undefined:this.adapter.offset() var triggeredGroups={} var axes this.handleScroll() axes={ horizontal: { contextOffset: isWindow ? 0:contextOffset.left, contextScroll: isWindow ? 0:this.oldScroll.x, contextDimension: this.innerWidth(), oldScroll: this.oldScroll.x, forward: 'right', backward: 'left', offsetProp: 'left' }, vertical: { contextOffset: isWindow ? 0:contextOffset.top, contextScroll: isWindow ? 0:this.oldScroll.y, contextDimension: this.innerHeight(), oldScroll: this.oldScroll.y, forward: 'down', backward: 'up', offsetProp: 'top' }} for (var axisKey in axes){ var axis=axes[axisKey] for (var waypointKey in this.waypoints[axisKey]){ var waypoint=this.waypoints[axisKey][waypointKey] var adjustment=waypoint.options.offset var oldTriggerPoint=waypoint.triggerPoint var elementOffset=0 var freshWaypoint=oldTriggerPoint==null var contextModifier, wasBeforeScroll, nowAfterScroll var triggeredBackward, triggeredForward if(waypoint.element!==waypoint.element.window){ elementOffset=waypoint.adapter.offset()[axis.offsetProp] } if(typeof adjustment==='function'){ adjustment=adjustment.apply(waypoint) } else if(typeof adjustment==='string'){ adjustment=parseFloat(adjustment) if(waypoint.options.offset.indexOf('%') > - 1){ adjustment=Math.ceil(axis.contextDimension * adjustment / 100) }} contextModifier=axis.contextScroll - axis.contextOffset waypoint.triggerPoint=Math.floor(elementOffset + contextModifier - adjustment) wasBeforeScroll=oldTriggerPoint < axis.oldScroll nowAfterScroll=waypoint.triggerPoint >=axis.oldScroll triggeredBackward=wasBeforeScroll&&nowAfterScroll triggeredForward = !wasBeforeScroll&&!nowAfterScroll if(!freshWaypoint&&triggeredBackward){ waypoint.queueTrigger(axis.backward) triggeredGroups[waypoint.group.id]=waypoint.group } else if(!freshWaypoint&&triggeredForward){ waypoint.queueTrigger(axis.forward) triggeredGroups[waypoint.group.id]=waypoint.group } else if(freshWaypoint&&axis.oldScroll >=waypoint.triggerPoint){ waypoint.queueTrigger(axis.forward) triggeredGroups[waypoint.group.id]=waypoint.group }} } Waypoint.requestAnimationFrame(function(){ for (var groupKey in triggeredGroups){ triggeredGroups[groupKey].flushTriggers() }}) return this } Context.findOrCreateByElement=function(element){ return Context.findByElement(element)||new Context(element) } Context.refreshAll=function(){ for (var contextId in contexts){ contexts[contextId].refresh() }} Context.findByElement=function(element){ return contexts[element.waypointContextKey] } window.onload=function(){ if(oldWindowLoad){ oldWindowLoad() } Context.refreshAll() } Waypoint.requestAnimationFrame=function(callback){ var requestFn=window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || requestAnimationFrameShim requestFn.call(window, callback) } Waypoint.Context=Context }()) ;(function(){ 'use strict' function byTriggerPoint(a, b){ return a.triggerPoint - b.triggerPoint } function byReverseTriggerPoint(a, b){ return b.triggerPoint - a.triggerPoint } var groups={ vertical: {}, horizontal: {}} var Waypoint=window.Waypoint function Group(options){ this.name=options.name this.axis=options.axis this.id=this.name + '-' + this.axis this.waypoints=[] this.clearTriggerQueues() groups[this.axis][this.name]=this } Group.prototype.add=function(waypoint){ this.waypoints.push(waypoint) } Group.prototype.clearTriggerQueues=function(){ this.triggerQueues={ up: [], down: [], left: [], right: [] }} Group.prototype.flushTriggers=function(){ for (var direction in this.triggerQueues){ var waypoints=this.triggerQueues[direction] var reverse=direction==='up'||direction==='left' waypoints.sort(reverse ? byReverseTriggerPoint:byTriggerPoint) for (var i=0, end=waypoints.length; i < end; i +=1){ var waypoint=waypoints[i] if(waypoint.options.continuous||i===waypoints.length - 1){ waypoint.trigger([direction]) }} } this.clearTriggerQueues() } Group.prototype.next=function(waypoint){ this.waypoints.sort(byTriggerPoint) var index=Waypoint.Adapter.inArray(waypoint, this.waypoints) var isLast=index===this.waypoints.length - 1 return isLast ? null:this.waypoints[index + 1] } Group.prototype.previous=function(waypoint){ this.waypoints.sort(byTriggerPoint) var index=Waypoint.Adapter.inArray(waypoint, this.waypoints) return index ? this.waypoints[index - 1]:null } Group.prototype.queueTrigger=function(waypoint, direction){ this.triggerQueues[direction].push(waypoint) } Group.prototype.remove=function(waypoint){ var index=Waypoint.Adapter.inArray(waypoint, this.waypoints) if(index > -1){ this.waypoints.splice(index, 1) }} Group.prototype.first=function(){ return this.waypoints[0] } Group.prototype.last=function(){ return this.waypoints[this.waypoints.length - 1] } Group.findOrCreate=function(options){ return groups[options.axis][options.name]||new Group(options) } Waypoint.Group=Group }()) ;(function(){ 'use strict' var $=window.jQuery var Waypoint=window.Waypoint function JQueryAdapter(element){ this.$element=$(element) } $.each([ 'innerHeight', 'innerWidth', 'off', 'offset', 'on', 'outerHeight', 'outerWidth', 'scrollLeft', 'scrollTop' ], function(i, method){ JQueryAdapter.prototype[method]=function(){ var args=Array.prototype.slice.call(arguments) return this.$element[method].apply(this.$element, args) }}) $.each([ 'extend', 'inArray', 'isEmptyObject' ], function(i, method){ JQueryAdapter[method]=$[method] }) Waypoint.adapters.push({ name: 'jquery', Adapter: JQueryAdapter }) Waypoint.Adapter=JQueryAdapter }()) ;(function(){ 'use strict' var Waypoint=window.Waypoint function createExtension(framework){ return function(){ var waypoints=[] var overrides=arguments[0] if(framework.isFunction(arguments[0])){ overrides=framework.extend({}, arguments[1]) overrides.handler=arguments[0] } this.each(function(){ var options=framework.extend({}, overrides, { element: this }) if(typeof options.context==='string'){ options.context=framework(this).closest(options.context)[0] } waypoints.push(new Waypoint(options)) }) return waypoints }} if(window.jQuery){ window.jQuery.fn.waypoint=createExtension(window.jQuery) } if(window.Zepto){ window.Zepto.fn.waypoint=createExtension(window.Zepto) }}()) ; !function(e,t){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",t):"object"==typeof module&&module.exports?module.exports=t():e.EvEmitter=t()}("undefined"!=typeof window?window:this,function(){function e(){}var t=e.prototype;return t.on=function(e,t){if(e&&t){var i=this._events=this._events||{},n=i[e]=i[e]||[];return n.indexOf(t)==-1&&n.push(t),this}},t.once=function(e,t){if(e&&t){this.on(e,t);var i=this._onceEvents=this._onceEvents||{},n=i[e]=i[e]||{};return n[t]=!0,this}},t.off=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){var n=i.indexOf(t);return n!=-1&&i.splice(n,1),this}},t.emitEvent=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){i=i.slice(0),t=t||[];for(var n=this._onceEvents&&this._onceEvents[e],o=0;o (winHeight||_window.height())); }, _setFocus: function(){ (mfp.st.focus ? mfp.content.find(mfp.st.focus).eq(0):mfp.wrap).focus(); }, _onFocusIn: function(e){ if(e.target!==mfp.wrap[0]&&!$.contains(mfp.wrap[0], e.target)){ mfp._setFocus(); return false; }}, _parseMarkup: function(template, values, item){ var arr; if(item.data){ values=$.extend(item.data, values); } _mfpTrigger(MARKUP_PARSE_EVENT, [template, values, item]); $.each(values, function(key, value){ if(value===undefined||value===false){ return true; } arr=key.split('_'); if(arr.length > 1){ var el=template.find(EVENT_NS + '-'+arr[0]); if(el.length > 0){ var attr=arr[1]; if(attr==='replaceWith'){ if(el[0]!==value[0]){ el.replaceWith(value); }}else if(attr==='img'){ if(el.is('img')){ el.attr('src', value); }else{ el.replaceWith(''); }}else{ el.attr(arr[1], value); }} }else{ template.find(EVENT_NS + '-'+key).html(value); }}); }, _getScrollbarSize: function(){ if(mfp.scrollbarSize===undefined){ var scrollDiv=document.createElement("div"); scrollDiv.style.cssText='width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;'; document.body.appendChild(scrollDiv); mfp.scrollbarSize=scrollDiv.offsetWidth - scrollDiv.clientWidth; document.body.removeChild(scrollDiv); } return mfp.scrollbarSize; }}; $.magnificPopup={ instance: null, proto: MagnificPopup.prototype, modules: [], open: function(options, index){ _checkInstance(); if(!options){ options={};}else{ options=$.extend(true, {}, options); } options.isObj=true; options.index=index||0; return this.instance.open(options); }, close: function(){ return $.magnificPopup.instance&&$.magnificPopup.instance.close(); }, registerModule: function(name, module){ if(module.options){ $.magnificPopup.defaults[name]=module.options; } $.extend(this.proto, module.proto); this.modules.push(name); }, defaults: { disableOn: 0, key: null, midClick: false, mainClass: '', preloader: true, focus: '', closeOnContentClick: false, closeOnBgClick: true, closeBtnInside: true, showCloseBtn: true, enableEscapeKey: true, modal: false, alignTop: false, removalDelay: 0, prependTo: null, fixedContentPos: 'auto', fixedBgPos: 'auto', overflowY: 'auto', closeMarkup: '', tClose: 'Close (Esc)', tLoading: 'Loading...' }}; $.fn.magnificPopup=function(options){ _checkInstance(); var jqEl=$(this); if(typeof options==="string"){ if(options==='open'){ var items, itemOpts=_isJQ ? jqEl.data('magnificPopup'):jqEl[0].magnificPopup, index=parseInt(arguments[1], 10)||0; if(itemOpts.items){ items=itemOpts.items[index]; }else{ items=jqEl; if(itemOpts.delegate){ items=items.find(itemOpts.delegate); } items=items.eq(index); } mfp._openClick({mfpEl:items}, jqEl, itemOpts); }else{ if(mfp.isOpen) mfp[options].apply(mfp, Array.prototype.slice.call(arguments, 1)); }}else{ options=$.extend(true, {}, options); if(_isJQ){ jqEl.data('magnificPopup', options); }else{ jqEl[0].magnificPopup=options; } mfp.addGroup(jqEl, options); } return jqEl; }; var INLINE_NS='inline', _hiddenClass, _inlinePlaceholder, _lastInlineElement, _putInlineElementsBack=function(){ if(_lastInlineElement){ _inlinePlaceholder.after(_lastInlineElement.addClass(_hiddenClass)).detach(); _lastInlineElement=null; }}; $.magnificPopup.registerModule(INLINE_NS, { options: { hiddenClass: 'hide', markup: '', tNotFound: 'Content not found' }, proto: { initInline: function(){ mfp.types.push(INLINE_NS); _mfpOn(CLOSE_EVENT+'.'+INLINE_NS, function(){ _putInlineElementsBack(); }); }, getInline: function(item, template){ _putInlineElementsBack(); if(item.src){ var inlineSt=mfp.st.inline, el=$(item.src); if(el.length){ var parent=el[0].parentNode; if(parent&&parent.tagName){ if(!_inlinePlaceholder){ _hiddenClass=inlineSt.hiddenClass; _inlinePlaceholder=_getEl(_hiddenClass); _hiddenClass='mfp-'+_hiddenClass; } _lastInlineElement=el.after(_inlinePlaceholder).detach().removeClass(_hiddenClass); } mfp.updateStatus('ready'); }else{ mfp.updateStatus('error', inlineSt.tNotFound); el=$('
'); } item.inlineElement=el; return el; } mfp.updateStatus('ready'); mfp._parseMarkup(template, {}, item); return template; }} }); var AJAX_NS='ajax', _ajaxCur, _removeAjaxCursor=function(){ if(_ajaxCur){ $(document.body).removeClass(_ajaxCur); }}, _destroyAjaxRequest=function(){ _removeAjaxCursor(); if(mfp.req){ mfp.req.abort(); }}; $.magnificPopup.registerModule(AJAX_NS, { options: { settings: null, cursor: 'mfp-ajax-cur', tError: 'The content could not be loaded.' }, proto: { initAjax: function(){ mfp.types.push(AJAX_NS); _ajaxCur=mfp.st.ajax.cursor; _mfpOn(CLOSE_EVENT+'.'+AJAX_NS, _destroyAjaxRequest); _mfpOn('BeforeChange.' + AJAX_NS, _destroyAjaxRequest); }, getAjax: function(item){ if(_ajaxCur){ $(document.body).addClass(_ajaxCur); } mfp.updateStatus('loading'); var opts=$.extend({ url: item.src, success: function(data, textStatus, jqXHR){ var temp={ data:data, xhr:jqXHR }; _mfpTrigger('ParseAjax', temp); mfp.appendContent($(temp.data), AJAX_NS); item.finished=true; _removeAjaxCursor(); mfp._setFocus(); setTimeout(function(){ mfp.wrap.addClass(READY_CLASS); }, 16); mfp.updateStatus('ready'); _mfpTrigger('AjaxContentAdded'); }, error: function(){ _removeAjaxCursor(); item.finished=item.loadError=true; mfp.updateStatus('error', mfp.st.ajax.tError.replace('%url%', item.src)); }}, mfp.st.ajax.settings); mfp.req=$.ajax(opts); return ''; }} }); var _imgInterval, _getTitle=function(item){ if(item.data&&item.data.title!==undefined) return item.data.title; var src=mfp.st.image.titleSrc; if(src){ if($.isFunction(src)){ return src.call(mfp, item); }else if(item.el){ return item.el.attr(src)||''; }} return ''; }; $.magnificPopup.registerModule('image', { options: { markup: '
'+ '
'+ '
'+ '
'+ '
'+ '
'+ '
'+ '
'+ '
'+ '
'+ '
'+ '
', cursor: 'mfp-zoom-out-cur', titleSrc: 'title', verticalFit: true, tError: 'The image could not be loaded.' }, proto: { initImage: function(){ var imgSt=mfp.st.image, ns='.image'; mfp.types.push('image'); _mfpOn(OPEN_EVENT+ns, function(){ if(mfp.currItem.type==='image'&&imgSt.cursor){ $(document.body).addClass(imgSt.cursor); }}); _mfpOn(CLOSE_EVENT+ns, function(){ if(imgSt.cursor){ $(document.body).removeClass(imgSt.cursor); } _window.off('resize' + EVENT_NS); }); _mfpOn('Resize'+ns, mfp.resizeImage); if(mfp.isLowIE){ _mfpOn('AfterChange', mfp.resizeImage); }}, resizeImage: function(){ var item=mfp.currItem; if(!item||!item.img) return; if(mfp.st.image.verticalFit){ var decr=0; if(mfp.isLowIE){ decr=parseInt(item.img.css('padding-top'), 10) + parseInt(item.img.css('padding-bottom'),10); } item.img.css('max-height', mfp.wH-decr); }}, _onImageHasSize: function(item){ if(item.img){ item.hasSize=true; if(_imgInterval){ clearInterval(_imgInterval); } item.isCheckingImgSize=false; _mfpTrigger('ImageHasSize', item); if(item.imgHidden){ if(mfp.content) mfp.content.removeClass('mfp-loading'); item.imgHidden=false; }} }, findImageSize: function(item){ var counter=0, img=item.img[0], mfpSetInterval=function(delay){ if(_imgInterval){ clearInterval(_imgInterval); } _imgInterval=setInterval(function(){ if(img.naturalWidth > 0){ mfp._onImageHasSize(item); return; } if(counter > 200){ clearInterval(_imgInterval); } counter++; if(counter===3){ mfpSetInterval(10); }else if(counter===40){ mfpSetInterval(50); }else if(counter===100){ mfpSetInterval(500); }}, delay); }; mfpSetInterval(1); }, getImage: function(item, template){ var guard=0, onLoadComplete=function(){ if(item){ if(item.img[0].complete){ item.img.off('.mfploader'); if(item===mfp.currItem){ mfp._onImageHasSize(item); mfp.updateStatus('ready'); } item.hasSize=true; item.loaded=true; _mfpTrigger('ImageLoadComplete'); }else{ guard++; if(guard < 200){ setTimeout(onLoadComplete,100); }else{ onLoadError(); }} }}, onLoadError=function(){ if(item){ item.img.off('.mfploader'); if(item===mfp.currItem){ mfp._onImageHasSize(item); mfp.updateStatus('error', imgSt.tError.replace('%url%', item.src)); } item.hasSize=true; item.loaded=true; item.loadError=true; }}, imgSt=mfp.st.image; var el=template.find('.mfp-img'); if(el.length){ var img=document.createElement('img'); img.className='mfp-img'; if(item.el&&item.el.find('img').length){ img.alt=item.el.find('img').attr('alt'); } item.img=$(img).on('load.mfploader', onLoadComplete).on('error.mfploader', onLoadError); img.src=item.src; if(el.is('img')){ item.img=item.img.clone(); } img=item.img[0]; if(img.naturalWidth > 0){ item.hasSize=true; }else if(!img.width){ item.hasSize=false; }} mfp._parseMarkup(template, { title: _getTitle(item), img_replaceWith: item.img }, item); mfp.resizeImage(); if(item.hasSize){ if(_imgInterval) clearInterval(_imgInterval); if(item.loadError){ template.addClass('mfp-loading'); mfp.updateStatus('error', imgSt.tError.replace('%url%', item.src)); }else{ template.removeClass('mfp-loading'); mfp.updateStatus('ready'); } return template; } mfp.updateStatus('loading'); item.loading=true; if(!item.hasSize){ item.imgHidden=true; template.addClass('mfp-loading'); mfp.findImageSize(item); } return template; }} }); var hasMozTransform, getHasMozTransform=function(){ if(hasMozTransform===undefined){ hasMozTransform=document.createElement('p').style.MozTransform!==undefined; } return hasMozTransform; }; $.magnificPopup.registerModule('zoom', { options: { enabled: false, easing: 'ease-in-out', duration: 300, opener: function(element){ return element.is('img') ? element:element.find('img'); }}, proto: { initZoom: function(){ var zoomSt=mfp.st.zoom, ns='.zoom', image; if(!zoomSt.enabled||!mfp.supportsTransition){ return; } var duration=zoomSt.duration, getElToAnimate=function(image){ var newImg=image.clone().removeAttr('style').removeAttr('class').addClass('mfp-animated-image'), transition='all '+(zoomSt.duration/1000)+'s ' + zoomSt.easing, cssObj={ position: 'fixed', zIndex: 9999, left: 0, top: 0, '-webkit-backface-visibility': 'hidden' }, t='transition'; cssObj['-webkit-'+t]=cssObj['-moz-'+t]=cssObj['-o-'+t]=cssObj[t]=transition; newImg.css(cssObj); return newImg; }, showMainContent=function(){ mfp.content.css('visibility', 'visible'); }, openTimeout, animatedImg; _mfpOn('BuildControls'+ns, function(){ if(mfp._allowZoom()){ clearTimeout(openTimeout); mfp.content.css('visibility', 'hidden'); image=mfp._getItemToZoom(); if(!image){ showMainContent(); return; } animatedImg=getElToAnimate(image); animatedImg.css(mfp._getOffset()); mfp.wrap.append(animatedImg); openTimeout=setTimeout(function(){ animatedImg.css(mfp._getOffset(true)); openTimeout=setTimeout(function(){ showMainContent(); setTimeout(function(){ animatedImg.remove(); image=animatedImg=null; _mfpTrigger('ZoomAnimationEnded'); }, 16); }, duration); }, 16); }}); _mfpOn(BEFORE_CLOSE_EVENT+ns, function(){ if(mfp._allowZoom()){ clearTimeout(openTimeout); mfp.st.removalDelay=duration; if(!image){ image=mfp._getItemToZoom(); if(!image){ return; } animatedImg=getElToAnimate(image); } animatedImg.css(mfp._getOffset(true)); mfp.wrap.append(animatedImg); mfp.content.css('visibility', 'hidden'); setTimeout(function(){ animatedImg.css(mfp._getOffset()); }, 16); }}); _mfpOn(CLOSE_EVENT+ns, function(){ if(mfp._allowZoom()){ showMainContent(); if(animatedImg){ animatedImg.remove(); } image=null; }}); }, _allowZoom: function(){ return mfp.currItem.type==='image'; }, _getItemToZoom: function(){ if(mfp.currItem.hasSize){ return mfp.currItem.img; }else{ return false; }}, _getOffset: function(isLarge){ var el; if(isLarge){ el=mfp.currItem.img; }else{ el=mfp.st.zoom.opener(mfp.currItem.el||mfp.currItem); } var offset=el.offset(); var paddingTop=parseInt(el.css('padding-top'),10); var paddingBottom=parseInt(el.css('padding-bottom'),10); offset.top -=($(window).scrollTop() - paddingTop); var obj={ width: el.width(), height: (_isJQ ? el.innerHeight():el[0].offsetHeight) - paddingBottom - paddingTop }; if(getHasMozTransform()){ obj['-moz-transform']=obj['transform']='translate(' + offset.left + 'px,' + offset.top + 'px)'; }else{ obj.left=offset.left; obj.top=offset.top; } return obj; }} }); var IFRAME_NS='iframe', _emptyPage='//about:blank', _fixIframeBugs=function(isShowing){ if(mfp.currTemplate[IFRAME_NS]){ var el=mfp.currTemplate[IFRAME_NS].find('iframe'); if(el.length){ if(!isShowing){ el[0].src=_emptyPage; } if(mfp.isIE8){ el.css('display', isShowing ? 'block':'none'); }} }}; $.magnificPopup.registerModule(IFRAME_NS, { options: { markup: '
'+ '
'+ ''+ '
', srcAction: 'iframe_src', patterns: { youtube: { index: 'youtube.com', id: 'v=', src: '//www.youtube.com/embed/%id%?autoplay=1' }, youtube_compressed_url: { index: 'youtu.be/', id: '/', src: '//www.youtube.com/embed/%id%?autoplay=1' }, vimeo: { index: 'vimeo.com/', id: '/', src: '//player.vimeo.com/video/%id%?autoplay=1' }, gmaps: { index: '//maps.google.', src: '%id%&output=embed' }} }, proto: { initIframe: function(){ mfp.types.push(IFRAME_NS); _mfpOn('BeforeChange', function(e, prevType, newType){ if(prevType!==newType){ if(prevType===IFRAME_NS){ _fixIframeBugs(); }else if(newType===IFRAME_NS){ _fixIframeBugs(true); }} }); _mfpOn(CLOSE_EVENT + '.' + IFRAME_NS, function(){ _fixIframeBugs(); }); }, getIframe: function(item, template){ var embedSrc=item.src; var iframeSt=mfp.st.iframe; $.each(iframeSt.patterns, function(){ if(embedSrc.indexOf(this.index) > -1){ if(this.id){ if(typeof this.id==='string'){ embedSrc=embedSrc.substr(embedSrc.lastIndexOf(this.id)+this.id.length, embedSrc.length); }else{ embedSrc=this.id.call(this, embedSrc); }} embedSrc=this.src.replace('%id%', embedSrc); return false; }}); var dataObj={}; if(iframeSt.srcAction){ dataObj[iframeSt.srcAction]=embedSrc; } mfp._parseMarkup(template, dataObj, item); mfp.updateStatus('ready'); return template; }} }); var _getLoopedId=function(index){ var numSlides=mfp.items.length; if(index > numSlides - 1){ return index - numSlides; }else if(index < 0){ return numSlides + index; } return index; }, _replaceCurrTotal=function(text, curr, total){ return text.replace(/%curr%/gi, curr + 1).replace(/%total%/gi, total); }; $.magnificPopup.registerModule('gallery', { options: { enabled: false, arrowMarkup: '', preload: [0,2], navigateByImgClick: true, arrows: true, tPrev: 'Previous (Left arrow key)', tNext: 'Next (Right arrow key)', tCounter: '%curr% of %total%' }, proto: { initGallery: function(){ var gSt=mfp.st.gallery, ns='.mfp-gallery', supportsFastClick=Boolean($.fn.mfpFastClick); mfp.direction=true; if(!gSt||!gSt.enabled) return false; _wrapClasses +=' mfp-gallery'; _mfpOn(OPEN_EVENT+ns, function(){ if(gSt.navigateByImgClick){ mfp.wrap.on('click'+ns, '.mfp-img', function(){ if(mfp.items.length > 1){ mfp.next(); return false; }}); } _document.on('keydown'+ns, function(e){ if(e.keyCode===37){ mfp.prev(); }else if(e.keyCode===39){ mfp.next(); }}); }); _mfpOn('UpdateStatus'+ns, function(e, data){ if(data.text){ data.text=_replaceCurrTotal(data.text, mfp.currItem.index, mfp.items.length); }}); _mfpOn(MARKUP_PARSE_EVENT+ns, function(e, element, values, item){ var l=mfp.items.length; values.counter=l > 1 ? _replaceCurrTotal(gSt.tCounter, item.index, l):''; }); _mfpOn('BuildControls' + ns, function(){ if(mfp.items.length > 1&&gSt.arrows&&!mfp.arrowLeft){ var markup=gSt.arrowMarkup, arrowLeft=mfp.arrowLeft=$(markup.replace(/%title%/gi, gSt.tPrev).replace(/%dir%/gi, 'left')).addClass(PREVENT_CLOSE_CLASS), arrowRight=mfp.arrowRight=$(markup.replace(/%title%/gi, gSt.tNext).replace(/%dir%/gi, 'right')).addClass(PREVENT_CLOSE_CLASS); var eName=supportsFastClick ? 'mfpFastClick':'click'; arrowLeft[eName](function(){ mfp.prev(); }); arrowRight[eName](function(){ mfp.next(); }); if(mfp.isIE7){ _getEl('b', arrowLeft[0], false, true); _getEl('a', arrowLeft[0], false, true); _getEl('b', arrowRight[0], false, true); _getEl('a', arrowRight[0], false, true); } mfp.container.append(arrowLeft.add(arrowRight)); }}); _mfpOn(CHANGE_EVENT+ns, function(){ if(mfp._preloadTimeout) clearTimeout(mfp._preloadTimeout); mfp._preloadTimeout=setTimeout(function(){ mfp.preloadNearbyImages(); mfp._preloadTimeout=null; }, 16); }); _mfpOn(CLOSE_EVENT+ns, function(){ _document.off(ns); mfp.wrap.off('click'+ns); if(mfp.arrowLeft&&supportsFastClick){ mfp.arrowLeft.add(mfp.arrowRight).destroyMfpFastClick(); } mfp.arrowRight=mfp.arrowLeft=null; }); }, next: function(){ mfp.direction=true; mfp.index=_getLoopedId(mfp.index + 1); mfp.updateItemHTML(); }, prev: function(){ mfp.direction=false; mfp.index=_getLoopedId(mfp.index - 1); mfp.updateItemHTML(); }, goTo: function(newIndex){ mfp.direction=(newIndex >=mfp.index); mfp.index=newIndex; mfp.updateItemHTML(); }, preloadNearbyImages: function(){ var p=mfp.st.gallery.preload, preloadBefore=Math.min(p[0], mfp.items.length), preloadAfter=Math.min(p[1], mfp.items.length), i; for(i=1; i <=(mfp.direction ? preloadAfter:preloadBefore); i++){ mfp._preloadItem(mfp.index+i); } for(i=1; i <=(mfp.direction ? preloadBefore:preloadAfter); i++){ mfp._preloadItem(mfp.index-i); }}, _preloadItem: function(index){ index=_getLoopedId(index); if(mfp.items[index].preloaded){ return; } var item=mfp.items[index]; if(!item.parsed){ item=mfp.parseEl(index); } _mfpTrigger('LazyLoad', item); if(item.type==='image'){ item.img=$('').on('load.mfploader', function(){ item.hasSize=true; }).on('error.mfploader', function(){ item.hasSize=true; item.loadError=true; _mfpTrigger('LazyLoadError', item); }).attr('src', item.src); } item.preloaded=true; }} }); /* Touch Support that might be implemented some day addSwipeGesture: function(){ var startX, moved, multipleTouches; return; var namespace='.mfp', addEventNames=function(pref, down, move, up, cancel){ mfp._tStart=pref + down + namespace; mfp._tMove=pref + move + namespace; mfp._tEnd=pref + up + namespace; mfp._tCancel=pref + cancel + namespace; }; if(window.navigator.msPointerEnabled){ addEventNames('MSPointer', 'Down', 'Move', 'Up', 'Cancel'); }else if('ontouchstart' in window){ addEventNames('touch', 'start', 'move', 'end', 'cancel'); }else{ return; } _window.on(mfp._tStart, function(e){ var oE=e.originalEvent; multipleTouches=moved=false; startX=oE.pageX||oE.changedTouches[0].pageX; }).on(mfp._tMove, function(e){ if(e.originalEvent.touches.length > 1){ multipleTouches=e.originalEvent.touches.length; }else{ moved=true; }}).on(mfp._tEnd + ' ' + mfp._tCancel, function(e){ if(moved&&!multipleTouches){ var oE=e.originalEvent, diff=startX - (oE.pageX||oE.changedTouches[0].pageX); if(diff > 20){ mfp.next(); }else if(diff < -20){ mfp.prev(); }} }); }, */ var RETINA_NS='retina'; $.magnificPopup.registerModule(RETINA_NS, { options: { replaceSrc: function(item){ return item.src.replace(/\.\w+$/, function(m){ return '@2x' + m; }); }, ratio: 1 }, proto: { initRetina: function(){ if(window.devicePixelRatio > 1){ var st=mfp.st.retina, ratio=st.ratio; ratio = !isNaN(ratio) ? ratio:ratio(); if(ratio > 1){ _mfpOn('ImageHasSize' + '.' + RETINA_NS, function(e, item){ item.img.css({ 'max-width': item.img[0].naturalWidth / ratio, 'width': '100%' }); }); _mfpOn('ElementParse' + '.' + RETINA_NS, function(e, item){ item.src=st.replaceSrc(item, ratio); }); }} }} }); /** * FastClick event implementation. (removes 300ms delay on touch devices) * Based on https://developers.google.com/mobile/articles/fast_buttons * * You may use it outside the Magnific Popup by calling just: * * $('.your-el').mfpFastClick(function(){ * console.log('Clicked!'); * }); * * To unbind: * $('.your-el').destroyMfpFastClick(); * * * Note that it's a very basic and simple implementation, it blocks ghost click on the same element where it was bound. * If you need something more advanced, use plugin by FT Labs https://github.com/ftlabs/fastclick * */ (function(){ var ghostClickDelay=1000, supportsTouch='ontouchstart' in window, unbindTouchMove=function(){ _window.off('touchmove'+ns+' touchend'+ns); }, eName='mfpFastClick', ns='.'+eName; $.fn.mfpFastClick=function(callback){ return $(this).each(function(){ var elem=$(this), lock; if(supportsTouch){ var timeout, startX, startY, pointerMoved, point, numPointers; elem.on('touchstart' + ns, function(e){ pointerMoved=false; numPointers=1; point=e.originalEvent ? e.originalEvent.touches[0]:e.touches[0]; startX=point.clientX; startY=point.clientY; _window.on('touchmove'+ns, function(e){ point=e.originalEvent ? e.originalEvent.touches:e.touches; numPointers=point.length; point=point[0]; if(Math.abs(point.clientX - startX) > 10 || Math.abs(point.clientY - startY) > 10){ pointerMoved=true; unbindTouchMove(); }}).on('touchend'+ns, function(e){ unbindTouchMove(); if(pointerMoved||numPointers > 1){ return; } lock=true; e.preventDefault(); clearTimeout(timeout); timeout=setTimeout(function(){ lock=false; }, ghostClickDelay); callback(); }); }); } elem.on('click' + ns, function(){ if(!lock){ callback(); }}); }); }; $.fn.destroyMfpFastClick=function(){ $(this).off('touchstart' + ns + ' click' + ns); if(supportsTouch) _window.off('touchmove'+ns+' touchend'+ns); };})(); _checkInstance(); })); ;(function ($){ "use strict"; var methods=(function (){ var c={ bcClass: 'sf-breadcrumb', menuClass: 'sf-js-enabled', anchorClass: 'sf-with-ul', menuArrowClass: 'sf-arrows' }, ios=(function (){ var ios=/iPhone|iPad|iPod/i.test(navigator.userAgent); if(ios){ $('html').css('cursor', 'pointer').on('click', $.noop); } return ios; })(), wp7=(function (){ var style=document.documentElement.style; return ('behavior' in style&&'fill' in style&&/iemobile/i.test(navigator.userAgent)); })(), toggleMenuClasses=function ($menu, o){ var classes=c.menuClass; if(o.cssArrows){ classes +=' ' + c.menuArrowClass; } $menu.toggleClass(classes); }, setPathToCurrent=function ($menu, o){ return $menu.find('li.' + o.pathClass).slice(0, o.pathLevels) .addClass(o.hoverClass + ' ' + c.bcClass) .filter(function (){ return ($(this).children(o.popUpSelector).hide().show().length); }).removeClass(o.pathClass); }, toggleAnchorClass=function ($li){ $li.children('a').toggleClass(c.anchorClass); }, toggleTouchAction=function ($menu){ var touchAction=$menu.css('ms-touch-action'); touchAction=(touchAction==='pan-y') ? 'auto':'pan-y'; $menu.css('ms-touch-action', touchAction); }, applyHandlers=function ($menu, o){ var targets='li:has(' + o.popUpSelector + ')'; if($.fn.hoverIntent&&!o.disableHI){ $menu.hoverIntent(over, out, targets); }else{ $menu .on('mouseenter.superfish', targets, over) .on('mouseleave.superfish', targets, out); } var touchevent='MSPointerDown.superfish'; if(!ios){ touchevent +=' touchend.superfish'; } if(wp7){ touchevent +=' mousedown.superfish'; } $menu .on('focusin.superfish', 'li', over) .on('focusout.superfish', 'li', out) .on(touchevent, 'a', o, touchHandler); }, touchHandler=function (e){ var $this=$(this), $ul=$this.siblings(e.data.popUpSelector); if($ul.length > 0&&$ul.is(':hidden')){ $this.one('click.superfish', false); if(e.type==='MSPointerDown'){ $this.trigger('focus'); }else{ $.proxy(over, $this.parent('li'))(); }} }, over=function (){ var $this=$(this), o=getOptions($this); if($(this).parents('.megamenu').length > 0) return; clearTimeout(o.sfTimer); $this.siblings().superfish('hide').end().superfish('show'); }, out=function (){ var $this=$(this), o=getOptions($this); if(ios){ $.proxy(close, $this, o)(); }else{ clearTimeout(o.sfTimer); o.sfTimer=setTimeout($.proxy(close, $this, o), o.delay); }}, close=function (o){ o.retainPath=($.inArray(this[0], o.$path) > -1); this.superfish('hide'); if(!this.parents('.' + o.hoverClass).length){ o.onIdle.call(getMenu(this)); if(o.$path.length){ $.proxy(over, o.$path)(); }} }, getMenu=function ($el){ return $el.closest('.' + c.menuClass); }, getOptions=function ($el){ return getMenu($el).data('sf-options'); }; return { hide: function (instant){ if(this.length){ var $this=this, o=getOptions($this); if(!o){ return this; } if($(this).hasClass('menu-item-over')&&$(this).hasClass('megamenu')){ return true; } var not=(o.retainPath===true) ? o.$path:'', $ul=$this.find('li.' + o.hoverClass).add(this).not(not).removeClass(o.hoverClass).children(o.popUpSelector), speed=o.speedOut; if(instant){ $ul.show(); speed=0; } o.retainPath=false; o.onBeforeHide.call($ul); if(o.dropdownStyle=='minimal'){ var $this=$(this); o.onHide.call($this); }else{ $ul.stop(true, true).animate(o.animationOut, speed, function (){ var $this=$(this); o.onHide.call($this); }); } if($(this).parents('.megamenu').length > 0) return; if($('#header-outer[data-megamenu-rt="1"]').length > 0&&$('#header-outer[data-transparent-header="true"]').length > 0){ if($('#header-outer.scrolled-down').length==0&&$('#header-outer.small-nav').length==0&&$('#header-outer.detached').length==0&&$('#header-outer.fixed-menu').length==0){ $('#header-outer').addClass('transparent'); } if($('#header-outer[data-permanent-transparent="1"][data-transparent-header="true"]').length > 0){ $('#header-outer').addClass('transparent'); }} } return this; }, show: function (){ if($(this).parents('.megamenu').length > 0) return; var o=getOptions(this); if(!o){ return this; } var $this=this.addClass(o.hoverClass), $ul=$this.children(o.popUpSelector); if($('#header-outer[data-megamenu-rt="1"]').length > 0&&$(this).hasClass('megamenu')&&$('#header-outer').attr('data-transparent-header')=='true'){ $('#header-outer').addClass('no-transition'); $('#header-outer').removeClass('transparent'); } o.onBeforeShow.call($ul); if(!$($ul).parents('li').hasClass('megamenu')&&!$($ul).parents('ul').hasClass('sub-menu')&&$ul.offset()){ $ul.addClass('temp-hidden-display'); var docW=$("#top .container").width(); var elm=$ul; var off=elm.offset(); var l=off.left - ($(window).width() - docW)/2; var w=elm.width(); var isEntirelyVisible=(l+w <=$(window).width()-100); if(! isEntirelyVisible){ $ul.parents('li').addClass('edge'); }else{ $ul.parents('li').removeClass('edge'); } $ul.removeClass('temp-hidden-display'); } if(o.dropdownStyle=='minimal'){ o.onShow.call($ul); }else{ $ul.stop(true, true).animate(o.animation, o.speed, function (){ o.onShow.call($ul); }); } if($ul.length > 0&&$ul.parents('.sub-menu').length > 0&&$ul.parents('.sf-menu').length > 0){ if($ul.offset().left + $ul.outerWidth() > $(window).width()){ $ul.addClass('on-left-side'); $ul.find('ul').addClass('on-left-side'); }} return this; }, destroy: function (){ return this.each(function (){ var $this=$(this), o=$this.data('sf-options'), $hasPopUp; if(!o){ return false; } $hasPopUp=$this.find(o.popUpSelector).parent('li'); clearTimeout(o.sfTimer); toggleMenuClasses($this, o); toggleAnchorClass($hasPopUp); toggleTouchAction($this); $this.off('.superfish').off('.hoverIntent'); $hasPopUp.children(o.popUpSelector).attr('style', function (i, style){ return style.replace(/display[^;]+;?/g, ''); }); o.$path.removeClass(o.hoverClass + ' ' + c.bcClass).addClass(o.pathClass); $this.find('.' + o.hoverClass).removeClass(o.hoverClass); o.onDestroy.call($this); $this.removeData('sf-options'); }); }, init: function (op){ return this.each(function (){ var $this=$(this); if($this.data('sf-options')){ return false; } var o=$.extend({}, $.fn.superfish.defaults, op), $hasPopUp=$this.find(o.popUpSelector).parent('li'); o.$path=setPathToCurrent($this, o); $this.data('sf-options', o); toggleMenuClasses($this, o); toggleAnchorClass($hasPopUp); toggleTouchAction($this); applyHandlers($this, o); $hasPopUp.not('.' + c.bcClass).superfish('hide', true); o.onInit.call(this); }); }};})(); $.fn.superfish=function (method, args){ if(methods[method]){ return methods[method].apply(this, Array.prototype.slice.call(arguments, 1)); } else if(typeof method==='object'||! method){ return methods.init.apply(this, arguments); }else{ return $.error('Method ' + method + ' does not exist on jQuery.fn.superfish'); }}; $.fn.superfish.defaults={ popUpSelector: 'ul,.sf-mega', hoverClass: 'sfHover', pathClass: 'overrideThisToUse', pathLevels: 1, delay: 800, animation: {opacity: 'show'}, animationOut: {opacity: 'hide'}, speed: 'normal', speedOut: 'fast', cssArrows: true, disableHI: false, onInit: $.noop, onBeforeShow: $.noop, onShow: $.noop, onBeforeHide: $.noop, onHide: $.noop, onIdle: $.noop, onDestroy: $.noop, dropdownStyle: ($('body[data-dropdown-style="minimal"]').length > 0) ? 'minimal':'classic' }; $.fn.extend({ hideSuperfishUl: methods.hide, showSuperfishUl: methods.show }); })(jQuery); (function($, window, document){ "use strict"; var $window=$(window), $body=$('body'), $offCanvasEl=$('#slide-out-widget-area'), $offCanvasBG=$('#slide-out-widget-area-bg'), $headerOuterEl=$('#header-outer'), $headerSecondaryEl=$('#header-secondary-outer'), $searchButtonEl=$('#header-outer #search-btn a'), $wpAdminBar=$('#wpadminbar'), $loadingScreenEl=$('#ajax-loading-screen'), $bodyBorderTop=$('.body-border-top'), $pageHeaderBG=$('#page-header-bg'), $footerOuterEl=$('#footer-outer'), $bodyBorderWidth=($('.body-border-right').length > 0) ? $('.body-border-right').width():0, $logoHeight=($headerOuterEl.is('[data-logo-height]')) ? parseInt($headerOuterEl.attr('data-logo-height')):30, headerPadding=($headerOuterEl.is('[data-padding]')) ? parseInt($headerOuterEl.attr('data-padding')):28, logoShrinkNum=($headerOuterEl.is('[data-shrink-num]')) ? $headerOuterEl.attr('data-shrink-num'):6, condenseHeaderLayout=($headerOuterEl.is('[data-condense="true"]')) ? true:false, usingLogoImage=($headerOuterEl.is('[data-using-logo="1"]')) ? true:false, headerResize=($headerOuterEl.is('[data-header-resize="1"]')) ? true:false, headerTransparent=($headerOuterEl.is('[data-transparent-header="true"]')) ? true:false, headerLayoutFormat=($body.is('[data-header-format]')) ? $body.attr('data-header-format'):'default', headerHideUntilNeeded=($body.is('[data-hhun]')) ? $body.attr('data-hhun'):'', $animationEasing=($body.is('[data-cae]')&&$body.attr('data-cae')!=='swing') ? $body.attr('data-cae'):'easeOutCubic', $animationDuration=($body.is('[data-cad]')) ? $body.attr('data-cad'):'650', bypassAnimations=(!$body.is('[data-m-animate="1"]')&&navigator.userAgent.match(/(Android|iPod|iPhone|iPad|BlackBerry|IEMobile|Opera Mini)/)) ? true:false, $portfolio_containers=[], $svgIcons=[], $nectarCustomSliderRotate=[], $flickitySliders=[], flickityDragArr=[], viewIndicatorArr=[], iconMouseFollowArr=[], postGridImgMouseFollowArr=[], $fsProjectSliderArr=[], $wooFlickityCarousels=[], $liquidBG_EL=[], $testimonialSliders=[], $mouseParallaxScenes=[], $nectarMasonryBlogs=[], $standAnimatedColTimeout=[], $animatedSVGIconTimeout=[], $projectCarouselSliderArr=[], $nectarPostGridArr=[], $verticalScrollingTabs=[], $tabbedClickCount=0, $fullscreenSelector='', $fullscreenMarkupBool=false, $bodyBorderHeaderColorMatch=false, nectarBoxRoll={ animating: 'false', perspect: 'not-rolled' }, $nectarFullPage={ $usingFullScreenRows: false }, $svgResizeTimeout, $bodyBorderSizeToRemove; if($bodyBorderTop.length > 0){ if($bodyBorderTop.css('background-color')=='#ffffff'&&$body.attr('data-header-color')=='light' || $bodyBorderTop.css('background-color')=='rgb(255, 255, 255)'&&$body.attr('data-header-color')=='light' || $bodyBorderTop.css('background-color')==$headerOuterEl.attr('data-user-set-bg')){ $bodyBorderHeaderColorMatch=true; }} var nectarDOMInfo={ usingMobileBrowser: (navigator.userAgent.match(/(Android|iPod|iPhone|iPad|BlackBerry|IEMobile|Opera Mini)/)) ? true:false, usingFrontEndEditor: (typeof window.vc_iframe==='undefined') ? false:true, getWindowSize: function(){ nectarDOMInfo.winH=window.innerHeight; nectarDOMInfo.winW=window.innerWidth; nectarDOMInfo.adminBarHeight=($wpAdminBar.length > 0) ? $wpAdminBar.height():0; nectarDOMInfo.secondaryHeaderHeight=($headerSecondaryEl.length > 0&&$headerSecondaryEl.css('display')!='none') ? $headerSecondaryEl.outerHeight():0; nectarDOMInfo.footerOuterHeight=($footerOuterEl.length > 0) ? $footerOuterEl.outerHeight():0; }, scrollTop: 0, clientX: 0, clientY: 0, scrollPosMouse: function(){ return $window.scrollTop(); }, scrollPosRAF: function(){ nectarDOMInfo.scrollTop=$window.scrollTop(); requestAnimationFrame(nectarDOMInfo.scrollPosRAF); }, bindEvents: function(){ if(!nectarDOMInfo.usingMobileBrowser){ $window.on('scroll', function(){ nectarDOMInfo.scrollTop=nectarDOMInfo.scrollPosMouse(); }); }else{ requestAnimationFrame(nectarDOMInfo.scrollPosRAF); } document.addEventListener("mousemove", function(e){ nectarDOMInfo.clientX=e.clientX; nectarDOMInfo.clientY=e.clientY; }); $window.on('resize', nectarDOMInfo.getWindowSize); }, init: function(){ $wpAdminBar=$('#wpadminbar'); this.getWindowSize(); this.scrollTop=this.scrollPosMouse(); this.bindEvents(); this.usingFrontEndEditor=(typeof window.vc_iframe==='undefined') ? false:true; }}; function smartResizeInit(){ fullWidthContentColumns(); parallaxRowsBGCals(); headerSpace(); OCM_overflowState(); showOnLeftSubMenu(); } function resizeInit(){ fullWidthSections(); fullWidthContentColumns(); addOrRemoveSF(); responsiveVideoIframes(); if(!nectarDOMInfo.usingMobileBrowser){ parallaxRowsBGCals(); }} function flexsliderInit(){ $('.flex-gallery').each(function (){ if(!$().flexslider){ return; } var $that=$(this); imagesLoaded($(this), function (){ $that.flexslider({ animation: 'fade', smoothHeight: false, animationSpeed: 500, useCSS: false, touch: true }); $('.flex-gallery .flex-direction-nav li a.flex-next').html(''); $('.flex-gallery .flex-direction-nav li a.flex-prev').html(''); }); }); } function NectarIconMouseFollow($el, iconType){ this.lastX=nectarDOMInfo.clientX; this.lastY=nectarDOMInfo.clientY; this.$el=$el; this.iconType=iconType; this.timeout=false; this.overEl=false; this.$dragEl=''; this.$viewEl=''; this.$closeEl=''; this.lerpDamp=0.18; this.createMarkup(); this.mouseBind(); } NectarIconMouseFollow.prototype.createMarkup=function(){ if(this.iconType==='horizontal-movement'){ if($('.nectar-drag-indicator').length==0){ var $usingBoxedClass=($('body > #boxed').length > 0) ? ' in-boxed':''; $('body').append('
'); this.$dragEl=$('.nectar-drag-indicator'); this.dragRAF(); }else{ this.$dragEl=$('.nectar-drag-indicator'); }} if(this.iconType==='view-indicator'){ if($('.nectar-view-indicator').length==0){ var $usingBoxedClass=($('body > #boxed').length > 0) ? ' in-boxed':''; $('body').append('
'); $('.nectar-view-indicator span').text($('.nectar-post-grid').attr('data-indicator-text')); this.$viewEl=$('.nectar-view-indicator'); this.viewRAF(); }else{ this.$viewEl=$('.nectar-view-indicator'); }} if(this.iconType==='close-indicator'){ if($('.nectar-view-indicator').length==0){ var $usingBoxedClass=($('body > #boxed').length > 0) ? ' in-boxed':''; $('body').append('
'); this.$closeEl=$('.nectar-close-indicator'); this.closeRAF(); }else{ this.$closeEl=$('.nectar-close-indicator'); }} if(this.iconType==='post-grid-images'){ if(!this.$el.hasClass('mouse-move-bound')){ this.$viewEl=this.$el.find('.nectar-post-grid-item-bg-wrap'); this.$el.addClass('mouse-move-bound'); this.viewRAF(); }else{ this.$viewEl=this.$el.find('.nectar-post-grid-item-bg-wrap'); this.viewRAF(); }} } NectarIconMouseFollow.prototype.mouseBind=function(){ var that=this; if(this.iconType==='horizontal-movement'){ that.$el.find('.flickity-viewport').on('mouseenter', function(){ that.$dragEl.addClass('visible'); }); that.$el.find('.flickity-viewport').on('mouseleave', function(){ that.$dragEl.removeClass('visible'); }); }else if(this.iconType==='close-indicator'){ $('body').on('click','.team-member[data-style*="bio_fullscreen"]',function(){ if($('.nectar_team_member_overlay:not(.open)').length > 0){ return; } that.$closeEl.addClass('visible'); that.$closeEl.find('.inner').addClass('visible'); }); $('body').on('click','.nectar_team_member_overlay:not(.animating)',function(){ that.$closeEl.removeClass('visible'); that.$closeEl.find('.inner').removeClass('visible'); }); $('body').on('mouseenter', '.nectar_team_member_overlay .bottom_meta a', function(){ that.$closeEl.removeClass('visible'); }); $('body').on('mouseleave', '.nectar_team_member_overlay .bottom_meta a', function(){ that.$closeEl.addClass('visible'); }); } else if(this.iconType==='view-indicator'){ var $color=that.$el.attr('data-indicator-color'); var $style=that.$el.attr('data-indicator-style'); that.$el.find('.nectar-post-grid-item').off(); that.$el.find('.nectar-post-grid-item').on('mouseenter', function(){ that.$viewEl.addClass('visible'); that.$viewEl.attr('class', function(i, c){ return c.replace(/(^|\s)style-\S+/g, ''); }); that.$viewEl.addClass('style-'+$style); if($style!=='see-through'){ that.$viewEl.find('.color-circle').css('background-color', $color); } clearTimeout(that.timeout); }); that.$el.find('.nectar-post-grid-item').on('mouseleave', function(){ that.timeout=setTimeout(function(){ that.$viewEl.removeClass('visible'); },100); }); that.$el.find('.nectar-post-grid-item .meta-category a').on('mouseenter', function(){ that.$viewEl.removeClass('visible'); }); that.$el.find('.nectar-post-grid-item .meta-category a').on('mouseleave', function(){ that.$viewEl.addClass('visible'); }); } else if(this.iconType==='post-grid-images'){ that.$el.on('mouseenter', function(){ $(this).addClass('mouse-over'); }); that.$el.on('mouseleave', function(){ $(this).removeClass('mouse-over'); }); }}; NectarIconMouseFollow.prototype.dragRAF=function(){ this.lastY=linearInterpolate(this.lastY, nectarDOMInfo.clientY, this.lerpDamp); this.lastX=linearInterpolate(this.lastX, nectarDOMInfo.clientX, this.lerpDamp); this.$dragEl.css({ 'transform': 'translateX(' + this.lastX + 'px) translateY(' + this.lastY + 'px)' }); requestAnimationFrame(this.dragRAF.bind(this)); }; NectarIconMouseFollow.prototype.viewRAF=function(){ this.lastY=linearInterpolate(this.lastY, nectarDOMInfo.clientY, this.lerpDamp); this.lastX=linearInterpolate(this.lastX, nectarDOMInfo.clientX, this.lerpDamp); this.$viewEl.css({ 'transform':'translateX(' + this.lastX + 'px) translateY(' + this.lastY + 'px)' }); requestAnimationFrame(this.viewRAF.bind(this)); }; NectarIconMouseFollow.prototype.closeRAF=function(){ this.lastY=linearInterpolate(this.lastY, nectarDOMInfo.clientY, this.lerpDamp); this.lastX=linearInterpolate(this.lastX, nectarDOMInfo.clientX, this.lerpDamp); this.$closeEl.css({ 'transform': 'translateX(' + this.lastX + 'px) translateY(' + this.lastY + 'px)' }); requestAnimationFrame(this.closeRAF.bind(this)); }; function flickityLazyCalcs(){ $('.wpb_gallery_slidesflickity_static_height_style .cell[data-lazy="true"]').each(function(){ $(this).css({ 'height': '', 'width':'' }); var heightAttr=parseInt($(this).find('img').attr('height')); var widthAttr=parseInt($(this).find('img').attr('width')); var dimensions=calculateAspectRatio(widthAttr, heightAttr, 2000, parseInt($(this).find('img').height())); $(this).css({ 'height': dimensions.height + 'px', 'width':dimensions.width + 'px' }); }); } function flickityLazyInit(){ if($('.wpb_gallery_slidesflickity_static_height_style .cell[data-lazy="true"]').length > 0){ flickityLazyCalcs(); $window.on('smartresize',flickityLazyCalcs); }} function flickityInit(){ if($('.nectar-flickity:not(.masonry)').length==0){ return false; } $flickitySliders=[]; flickityDragArr=[]; $('.nectar-flickity:not(.masonry)').each(function (i){ $(this).removeClass(function (index, className){ return (className.match(/(^|\s)instance-\S+/g)||[]).join(' '); }); $(this).addClass('instance-' + i); var $freeScrollBool=($(this).is('[data-free-scroll]')&&$(this).attr('data-free-scroll')=='true') ? true:false, $groupCellsBool=true, $flickContainBool=true, $flcikAttr=0.025, $paginationBool=false, $nextPrevArrowBool=true, $flickCellAlign='center'; if($(this).is('[data-format="fixed_text_content_fullwidth"]')){ $flickCellAlign='left'; $groupCellsBool=false; $flickContainBool=false; $flcikAttr=0.02; if($(this).parent().is('[data-alignment="right"]')){ $flickCellAlign='right'; }} if($freeScrollBool==true){ $groupCellsBool=false; } if($(this).attr('data-controls').length > 0 && $(this).attr('data-controls')=='next_prev_arrows'|| $(this).attr('data-controls').length > 0 && $(this).attr('data-controls')=='next_prev_arrows_overlaid'){ $paginationBool=false; $nextPrevArrowBool=true; }else{ $paginationBool=true; $nextPrevArrowBool=false; } if($(this).attr('data-controls').length > 0 && $(this).attr('data-controls')=='none'){ $paginationBool=false; $nextPrevArrowBool=false; } var $flickity_autoplay=false; if($(this).is('[data-autoplay]') && $(this).attr('data-autoplay')=='true'){ $flickity_autoplay=true; if($(this).is('[data-autoplay-dur]') && $(this).attr('data-autoplay-dur').length > 0){ if(parseInt($(this).attr('data-autoplay-dur')) > 100 && parseInt($(this).attr('data-autoplay-dur')) < 30000){ $flickity_autoplay=parseInt($(this).attr('data-autoplay-dur')); }} } var $that=$(this); var $frontEndEditorDrag=($('body.vc_editor').length > 0) ? false:true; var $frontEndEditorPause=($('body.vc_editor').length > 0) ? true:false; var $arrowShape=''; var $wrapAround=($(this).is('[data-wrap]')&&$(this).attr('data-wrap')=='no-wrap') ? false:true; var $flickity_adaptive_height=false; if($(this).is('[data-adaptive-height="true"]')){ $flickity_adaptive_height=true; } var $lazyload=($(this).find('img[data-flickity-lazyload]')) ? 1:false; if($(this).find('img[data-flickity-lazyload]')&&$(this).is('[data-overflow="visible"]')&&$(this).is('[data-wrap="no-wrap"]')){ $lazyload=2; } var $flickity_rtl=($body.hasClass('rtl')) ? true:false; if($(this).attr('data-controls').length > 0&&$(this).attr('data-controls')=='next_prev_arrows_overlaid' || $(this).attr('data-controls').length > 0&&$(this).attr('data-controls')=='touch_total'){ $arrowShape={ x0: 10, x1: 60, y1: 50, x2: 70, y2: 40, x3: 30 }}else{ $arrowShape={ x0: 20, x1: 70, y1: 30, x2: 70, y2: 25, x3: 70 }} $flickitySliders[i]=new Flickity('.nectar-flickity.instance-' + i, { contain: $flickContainBool, draggable: $frontEndEditorDrag, lazyLoad: $lazyload, imagesLoaded: true, percentPosition: true, adaptiveHeight: $flickity_adaptive_height, cellAlign: $flickCellAlign, groupCells: $groupCellsBool, prevNextButtons: $nextPrevArrowBool, freeScroll: $freeScrollBool, pageDots: $paginationBool, resize: true, selectedAttraction: $flcikAttr, autoPlay: $flickity_autoplay, rightToLeft: $flickity_rtl, pauseAutoPlayOnHover: $frontEndEditorPause, setGallerySize: true, wrapAround: $wrapAround, accessibility: false, arrowShape: $arrowShape }); if($(this).is('[data-controls="touch_total"]')){ if($(this).find('.visualized-total').length==0){ if($(this).parents('.full-width-content').length > 0&&$(this).parents('.vc_col-sm-12').length > 0){ $(this).append('
'); }else{ $(this).append('
'); }} if(!nectarDOMInfo.usingMobileBrowser){ flickityDragArr[i]=new NectarIconMouseFollow($(this),'horizontal-movement'); $flickitySliders[i].on('dragMove', function (event, pointer){ nectarDOMInfo.clientY=pointer.clientY; nectarDOMInfo.clientX=pointer.clientX; }); $flickitySliders[i].on('pointerDown', function (event, pointer){ $('.nectar-drag-indicator').addClass('pointer-down'); }); $flickitySliders[i].on('pointerUp', function (event, pointer){ $('.nectar-drag-indicator').removeClass('pointer-down'); }); } var $totalImgs=$(this).find('.flickity-page-dots li').length; var $totalIndicator=$(this).find('.visualized-total span'); var $totalPosition=1; var $totalWidth=$(this).find('.visualized-total').width(); $window.on('smartresize',function(){ setTimeout(function(){ $totalImgs=$that.find('.flickity-page-dots li').length; $totalWidth=$that.find('.visualized-total').width(); $totalPosition=($totalWidth / $totalImgs) * $that.find('.flickity-page-dots .is-selected').index(); $totalIndicator.css('width', 100/$totalImgs + '%'); $totalIndicator.css({ 'x':$totalPosition + 'px' }); },200); }); setTimeout(function(){ $totalImgs=$that.find('.flickity-page-dots li').length; $totalWidth=$that.find('.visualized-total').width(); $totalIndicator.css('width', 100/$totalImgs + '%'); },200); $flickitySliders[i].on('change', function (event, progress){ $totalPosition=($totalWidth / $totalImgs) * $that.find('.flickity-page-dots .is-selected').index(); $totalIndicator.css({ 'x':$totalPosition + 'px' }); }); } if($(this).is('[data-format="fixed_text_content_fullwidth"]')&&!nectarDOMInfo.usingFrontEndEditor){ var $onMobileBrowser=nectarDOMInfo.usingMobileBrowser; $flickitySliders[i].on('scroll', function (){ if($onMobileBrowser){ return; } var $flkSlideWidth=$that.find('.cell').outerWidth() + 25, $leftHeaderSize=($('body[data-header-format="left-header"]').length > 0&&$window.width() > 1000) ? 275:0, $extraWindowSpace=(($window.width() + $leftHeaderSize) - $that.parents('.main-content').width()) / 2; $extraWindowSpace +=parseInt($that.css('margin-left')) + 2; $flickitySliders[i].slides.forEach(function (slide, j){ var $scaleAmt=1, $translateXAmt=0, $rotateAmt=0, $slideZIndex=10, $opacityAmt=1, $slideOffset=$(slide.cells[0].element).offset().left, flkInstanceSlide=$('.nectar-flickity.instance-' + i + ' .cell:nth-child(' + (j + 1) + ')'); if($slideOffset - $extraWindowSpace < 0 && $slideOffset - $extraWindowSpace > $flkSlideWidth * -1){ $scaleAmt=1 + (($slideOffset - $extraWindowSpace) / 1500); $opacityAmt=1 + (($slideOffset - $extraWindowSpace + 70) / 550); $translateXAmt=(($slideOffset - $extraWindowSpace)) * -1; $rotateAmt=(($slideOffset - $extraWindowSpace) / 25) * -1; }else{ $scaleAmt=1; $opacityAmt=1; $translateXAmt=0; $rotateAmt=0; } if($slideOffset + 5 - $extraWindowSpace < 0 && $slideOffset - $extraWindowSpace > $flkSlideWidth * -1){ $slideZIndex=5; }else{ $slideZIndex=10; } flkInstanceSlide.css({ 'z-index': $slideZIndex }); flkInstanceSlide.find('.inner-wrap-outer').css({ 'transform': 'perspective(800px) translateX(' + $translateXAmt + 'px) rotateY(' + $rotateAmt + 'deg) translateZ(0)', 'opacity': $opacityAmt }); flkInstanceSlide.find('.inner-wrap').css({ 'transform': 'scale(' + $scaleAmt + ') translateZ(0)' }); }); }); } var $removeHiddenTimeout; var $removeMovingTimeout; $flickitySliders[i].on('dragStart', function (){ clearTimeout($removeHiddenTimeout); clearTimeout($removeMovingTimeout); $that.addClass('is-dragging'); $that.addClass('is-moving'); $that.find('.flickity-prev-next-button').addClass('hidden'); }); $flickitySliders[i].on('dragEnd', function (){ $that.removeClass('is-dragging'); $removeHiddenTimeout=setTimeout(function (){ $that.removeClass('is-moving'); $that.find('.flickity-prev-next-button').removeClass('hidden'); }, 600); $removeMovingTimeout=setTimeout(function (){ $that.removeClass('is-moving'); }, 300); }); $('.flickity-prev-next-button').on('click', function (){ clearTimeout($removeHiddenTimeout); $(this).parents('.nectar-flickity') .find('.flickity-prev-next-button') .addClass('hidden'); $removeHiddenTimeout=setTimeout(function (){ $that .find('.flickity-prev-next-button') .removeClass('hidden'); }, 600); }); if($that.hasClass('nectar-carousel')){ imagesLoaded($that, function (){ nectarCarouselFlkEH($that); }); }}); var $usingNectarCarouselFlk=($('.nectar-carousel.nectar-flickity:not(.masonry)').length > 0) ? true:false; if($usingNectarCarouselFlk){ $window.on('resize',setNectarCarouselFlkEH); }} function setNectarCarouselFlkEH(){ $('.nectar-carousel.nectar-flickity:not(.masonry)').each(function (){ nectarCarouselFlkEH($(this)); }); } function nectarCarouselFlkEH($slider_instance){ var $tallestSlideCol=0; $slider_instance .find('.flickity-slider > .cell') .css('height', 'auto'); $slider_instance.find('.flickity-slider > .cell').each(function (){ if($(this).height() > $tallestSlideCol){ $tallestSlideCol=$(this).height(); }}); if($tallestSlideCol < 10){ $tallestSlideCol='auto'; } $slider_instance .find('.flickity-slider > .cell') .css('height', $tallestSlideCol + 'px'); } function twentytwentyInit(){ $('.twentytwenty-container').each(function (){ var $that=$(this); if($that.find('.twentytwenty-handle').length==0){ $(this).imagesLoaded(function (){ $that.twentytwenty(); }); }}); } function initSF(){ addOrRemoveSF(); if($('body[data-header-format="left-header"]').length==0){ var $disableHI; if(!($('#header-outer[data-megamenu-rt="1"]').length > 0 && $('#header-outer[data-transparent-header="true"]').length > 0)){ $disableHI=true; }else{ $disableHI=false; } $(".sf-menu:not(.buttons)").superfish({ delay: 650, speed: 'fast', disableHI: $disableHI, speedOut: 'fast', animation: { opacity: 'show' }}); $('#header-outer .sf-menu.buttons li.menu-item').on('mouseover',function(){ $(this).addClass('sfHover'); }); $('#header-outer .sf-menu.buttons li.menu-item').on('mouseleave',function(){ var $that=$(this); if($that.is('.menu-item-has-children')){ setTimeout(function (){ if(!$that.is(':hover')){ $that.removeClass('sfHover'); }}, 200); }else{ $that.removeClass('sfHover'); }}); $('#header-secondary-outer li.megamenu, .sf-menu.buttons li.megamenu').removeClass('megamenu'); $('#header-outer .sf-menu > li:not(.megamenu) > ul > li > ul').each(function (){ if($(this).offset().left + $(this).outerWidth() > $window.width()){ $(this).addClass('on-left-side'); $(this).find('ul').addClass('on-left-side'); }}); $('body:not([data-header-format="left-header"]) header#top nav > ul > li.megamenu > ul > li > ul > li:has("> ul")').addClass('has-ul'); if($('body[data-megamenu-width="full-width"]').length > 0&&$('ul.sub-menu').length > 0){ megamenuFullwidth(); $window.on('smartresize', megamenuFullwidth); $('header#top nav > ul > li.megamenu > .sub-menu').css('box-sizing', 'content-box'); } $('header#top nav > ul.sf-menu > li.menu-item').on('mouseenter', function (){ $(this).addClass('menu-item-over'); }); $('header#top nav > ul.sf-menu > li.menu-item').on('mouseleave', function (){ $(this).removeClass('menu-item-over'); }); $('header#top nav .megamenu .sub-menu a.sf-with-ul .sf-sub-indicator, header#top .megamenu .sub-menu a .sf-sub-indicator').remove(); $('header#top nav > ul > li.megamenu > ul.sub-menu > li > a').each(function (){ if($(this).text()=='-'||$(this).text()=='–'||$(this).parent().hasClass('hide-title')){ $(this).remove(); }}); } if(nectarDOMInfo.usingMobileBrowser&&$('#header-outer[data-remove-fixed="1"]').length==0){ $body.attr('data-hhun', '0'); }} function megamenuFullwidth(){ var $windowWidth=$window.width(); var $headerContainerWidth=$('header#top > .container').width(); $('header#top nav > ul > li.megamenu > .sub-menu').css({ 'padding-left': ($windowWidth - $headerContainerWidth) / 2 + 'px', 'padding-right': ($windowWidth + 2 - $headerContainerWidth) / 2 + 'px', 'width': $headerContainerWidth, 'left': '-' + ($windowWidth - $headerContainerWidth) / 2 + 'px' }); } function addOrRemoveSF(){ if(nectarDOMInfo.winW < 1000&&$body.attr('data-responsive')=='1'){ $body.addClass('mobile'); $('header#top nav').css('display', 'none'); }else{ $body.removeClass('mobile'); $('header#top nav').css('display', ''); $('.slide-out-widget-area-toggle #toggle-nav .lines-button').removeClass('close'); }} function showOnLeftSubMenu(){ $('#header-outer .sf-menu > li:not(.megamenu) > ul > li > ul').each(function (){ $(this).removeClass('on-left-side'); if($(this).offset().left + $(this).outerWidth() > $window.width()){ $(this).addClass('on-left-side'); $(this).find('ul').addClass('on-left-side'); }else{ $(this).removeClass('on-left-side'); $(this).find('ul').removeClass('on-left-side'); }}); } function standardCarouselInit(){ if($('.carousel').length==0){ return; } if(typeof SalientRecentProjectsCarousel!=='undefined'){ $('ul.carousel.portfolio-items').each(function (i){ $projectCarouselSliderArr[i]=new SalientRecentProjectsCarousel($(this)); }); } $('ul.carousel:not(".clients"):not(.portfolio-items)').each(function (){ var $that=$(this), maxCols=($(this).parents('.carousel-wrap').attr('data-full-width')=='true') ? 'auto':3, scrollNum=($(this).parents('.carousel-wrap').attr('data-full-width')=='true') ? 'auto':'', colWidth=($(this).parents('.carousel-wrap').attr('data-full-width')=='true') ? 500:453, $autoplayBool=($(this).attr('data-autorotate')=='true') ? true:false, $themeSkin=true, $themeSkin2=true; var scrollSpeed, easing; if($('body.ascend').length > 0&&$(this).parents('.carousel-wrap').attr('data-full-width')!='true' || $('body.material').length > 0&&$(this).parents('.carousel-wrap').attr('data-full-width')!='true'){ if($(this).find('li').length % 3===0){ $themeSkin=true; $themeSkin2=true; }else{ $themeSkin=false; $themeSkin2=true; }}else{ $themeSkin=true; $themeSkin2=true; } scrollSpeed=(parseInt($(this).attr('data-scroll-speed'))) ? parseInt($(this).attr('data-scroll-speed')):700; easing=($(this).is('[data-easing]')) ? $(this).attr('data-easing'):'linear'; var $element=$that; if($that.find('img').length==0){ $element=$body; } imagesLoaded($element, function (){ $that.carouFredSel({ circular: $themeSkin, infinite: $themeSkin2, height: 'auto', responsive: true, items: { width: colWidth, visible: { min: 1, max: maxCols }}, swipe: { onTouch: true, onMouse: true, options: { excludedElements: "button, input, select, textarea, .noSwipe", tap: function (event, target){ if($(target).attr('href') && !$(target).is('[target="_blank"]') && !$(target).is('[rel^="prettyPhoto"]') && !$(target).is('.magnific-popup') && !$(target).is('.magnific')){ window.open($(target).attr('href'), '_self'); }} }, onBefore: function (){ $that.find('.work-item').trigger('mouseleave'); $that.find('.work-item .work-info a').trigger('mouseup'); }}, scroll: { items: scrollNum, easing: easing, duration: scrollSpeed, onBefore: function (){ if($('body.ascend').length > 0&&$that.parents('.carousel-wrap').attr('data-full-width')!='true' || $('body.material').length > 0&&$that.parents('.carousel-wrap').attr('data-full-width')!='true'){ $that.parents('.carousel-wrap') .find('.item-count .total') .html(Math.ceil($that.find('> li').length / $that.triggerHandler("currentVisible").length)); }}, onAfter: function (){ if($('body.ascend').length > 0&&$that.parents('.carousel-wrap').attr('data-full-width')!='true' || $('body.material').length > 0&&$that.parents('.carousel-wrap').attr('data-full-width')!='true'){ $that.parents('.carousel-wrap') .find('.item-count .current') .html($that.triggerHandler('currentPage') + 1); $that.parents('.carousel-wrap') .find('.item-count .total') .html(Math.ceil($that.find('> li').length / $that.triggerHandler("currentVisible").length)); }} }, prev: { button: function (){ return $that.parents('.carousel-wrap').find('.carousel-prev'); }}, next: { button: function (){ return $that.parents('.carousel-wrap').find('.carousel-next'); }}, auto: { play: $autoplayBool }}, { transition: true }).animate({ 'opacity': 1 }, 1300); $that .parents('.carousel-wrap') .wrap('